• Classes
  • Modules
  • Namespaces
  • Files
  • Related Pages
  • File List
  • File Members

acsncSupplier.h

Go to the documentation of this file.
00001 #ifndef SUPPLIER_H
00002 #define SUPPLIER_H
00003 
00004 /* @(#) $Id: acsncSupplier.h,v 1.67 2011/11/17 23:31:54 javarias Exp $
00005  *
00006  *    Supplier Abstract base class for notification channel push structured event
00007  *    supplier.
00008  *    ALMA - Atacama Large Millimiter Array
00009  *    (c) Associated Universities Inc., 2002 
00010  *    (c) European Southern Observatory, 2002
00011  *    Copyright by ESO (in the framework of the ALMA collaboration)
00012  *    and Cosylab 2002, All rights reserved
00013  *
00014  *    This library is free software; you can redistribute it and/or
00015  *    modify it under the terms of the GNU Lesser General Public
00016  *    License as published by the Free Software Foundation; either
00017  *    version 2.1 of the License, or (at your option) any later version.
00018  *
00019  *    This library is distributed in the hope that it will be useful,
00020  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00021  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00022  *    Lesser General Public License for more details.
00023  *
00024  *    You should have received a copy of the GNU Lesser General Public
00025  *    License along with this library; if not, write to the Free Software
00026  *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00027  */
00028 
00033 #include "acsncHelper.h"
00034 #include <acscomponentImpl.h>
00035 #include "RepeatGuardLogger.h"
00036 #include "acsncCircularQueue.h"
00037 
00038 namespace nc {
00055 class Supplier : 
00056     protected Helper, 
00057     public POA_CosNotifyComm::StructuredPushSupplier,
00058     protected virtual PortableServer::RefCountServantBase
00059 {
00060   public:
00070     Supplier(const char* channelName, 
00071              acscomponent::ACSComponentImpl* component,
00072                  const char* acsNCDomainName = 0);
00073 
00084     Supplier(const char* channelName, 
00085              CORBA::ORB_ptr orb_mp, 
00086              acscomponent::ACSComponentImpl* component,
00087                  const char* acsNCDomainName = 0);
00088     
00112     Supplier(const char* channelName, 
00113              int argc, 
00114              char *argv[],
00115              acscomponent::ACSComponentImpl* component,
00116                  const char* acsNCDomainName = 0);
00117 
00125     virtual void 
00126     disconnect();
00127 
00143     void 
00144     publishEvent(const CosNotification::StructuredEvent &event)
00145         ;
00146 
00160     virtual void 
00161     publishEvent(const CORBA::Any &eventData)
00162         ;
00163 
00173     virtual void 
00174     disconnect_structured_push_supplier();
00175     
00189     virtual void 
00190     subscription_change(const CosNotification::EventTypeSeq &eventsAdded,
00191                         const CosNotification::EventTypeSeq &eventsRemoved);
00192 
00197     void reconnect(::NotifyMonitoringExt::EventChannelFactory *ecf);
00198 
00199     void setAntennaName(std::string antennaName);
00200 
00208     void setAutoreconnect(bool autoreconnect);
00209 
00210   protected:
00214     virtual ~Supplier();
00215     
00224     void
00225     populateHeader(CosNotification::StructuredEvent &event)
00226         ;
00227 
00238     virtual void
00239     populateHeader(const CORBA::Any &any)
00240         ;
00241 
00251     void 
00252     setEventType(const char *);
00253 
00254 
00255 
00265     void
00266     createSupplier()
00267         ;
00268     
00280     void 
00281     destroyNotificationChannel()
00282         ;
00283 
00293     void
00294     init(CORBA::ORB_ptr orb)
00295         ;
00296 
00297 
00298     void
00299     reinit();
00300     
00305     CosNotifyChannelAdmin::SupplierAdmin_var SupplierAdmin_m;
00306     
00310     CosNotifyChannelAdmin::StructuredProxyPushConsumer_var proxyConsumer_m;
00311 
00315     CosNotifyComm::StructuredPushSupplier_var reference_m;
00316 
00317     
00318 
00324     acscomponent::ACSComponentImpl* component_mp;
00325 
00329     char* typeName_mp;
00330 
00334     unsigned long long count_m;
00335     Logging::RepeatGuardLogger<Logging::BaseLog> guardbl;
00340     CosNotification::StructuredEvent event_m;
00341     
00342     std::string antennaName;
00343 
00349     bool autoreconnect_m;
00350 
00351   private:
00352     
00353 
00357     void operator=(const Supplier&);
00358 
00362     Supplier(const Supplier&);
00363 
00364     CosNotifyChannelAdmin::AdminID adminid;
00365     CosNotifyChannelAdmin::ProxyID proxyConsumerID;
00366 
00367     CircularQueue eventBuff;
00368 
00369 };
00370  }; 
00371 #endif
00372 

Generated on Fri Apr 15 2016 15:14:17 for ACS-2016.4 C++ API by  doxygen 1.7.0