Go to the documentation of this file.00001 #ifndef SUPPLIER_H
00002 #define SUPPLIER_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
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
00201 protected:
00205 virtual ~Supplier();
00206
00215 void
00216 populateHeader(CosNotification::StructuredEvent &event)
00217 ;
00218
00229 virtual void
00230 populateHeader(const CORBA::Any &any)
00231 ;
00232
00242 void
00243 setEventType(const char *);
00244
00245
00246
00256 void
00257 createSupplier()
00258 ;
00259
00271 void
00272 destroyNotificationChannel()
00273 ;
00274
00284 void
00285 init(CORBA::ORB_ptr orb)
00286 ;
00287
00288
00289
00294 CosNotifyChannelAdmin::SupplierAdmin_var SupplierAdmin_m;
00295
00299 CosNotifyChannelAdmin::StructuredProxyPushConsumer_var proxyConsumer_m;
00300
00304 CosNotifyComm::StructuredPushSupplier_var reference_m;
00305
00306
00307
00313 acscomponent::ACSComponentImpl* component_mp;
00314
00318 char* typeName_mp;
00319
00323 unsigned long long count_m;
00324 Logging::RepeatGuardLogger<Logging::BaseLog> guardbl;
00329 CosNotification::StructuredEvent event_m;
00330
00331 std::string antennaName;
00332
00333 private:
00334
00335
00339 void operator=(const Supplier&);
00340
00344 Supplier(const Supplier&);
00345
00346 CosNotifyChannelAdmin::AdminID adminid;
00347 CosNotifyChannelAdmin::ProxyID proxyConsumerID;
00348
00349 CircularQueue eventBuff;
00350
00351 };
00352 };
00353 #endif
00354