Go to the documentation of this file.00001 #ifndef basenc_supplier_H
00002 #define basenc_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
00029
00030 #ifndef __cplusplus
00031 #error This is a C++ include file and cannot be used from plain C
00032 #endif
00033
00038 #include <orbsvcs/CosNotifyChannelAdminS.h>
00039 #include <orbsvcs/CosNotifyCommC.h>
00040 #include <orbsvcs/CosNamingC.h>
00041 #include <acsncS.h>
00042 #include "RepeatGuardLogger.h"
00043 #include "basencHelper.h"
00044
00048 class BaseSupplier : public POA_acsnc::OSPushSupplier,
00049 public PortableServer::RefCountServantBase,
00050 public BaseHelper
00051 {
00052 public:
00053
00061 BaseSupplier(const char* channelName, const char* acsNCDomainName = 0);
00062
00066 virtual void
00067 disconnect();
00068
00073 void
00074 init(CosNaming::NamingContext_ptr nc_p);
00075
00079 void done();
00080
00081
00087 virtual void
00088 subscription_change(const CosNotification::EventTypeSeq &added,
00089 const CosNotification::EventTypeSeq &removed);
00090
00095 virtual void
00096 disconnect_structured_push_supplier();
00097
00098 protected:
00102 virtual ~BaseSupplier();
00103
00115 void
00116 publishEvent(const CosNotification::StructuredEvent& event);
00117
00122 virtual void
00123 populateHeader(CosNotification::StructuredEvent& event);
00124
00125
00130 virtual const char*
00131 getEventType() = 0;
00132
00137 virtual const char*
00138 getEventName()
00139 { return ""; }
00140
00141
00142
00143
00144
00145
00146
00154 virtual acsnc::OSPushSupplier_ptr
00155 getCORBARef();
00156
00157
00158
00159 private:
00165 void
00166 connect();
00167
00172 CosNotifyChannelAdmin::SupplierAdmin_var supplierAdmin_m;
00173
00177 CosNotifyChannelAdmin::StructuredProxyPushConsumer_var proxyConsumer_m;
00178
00182 CosNotifyChannelAdmin::ProxyID proxyConsumerID_m;
00183
00184
00185
00189 CosNotifyChannelAdmin::AdminID adminID_m;
00190
00194 acsnc::OSPushSupplier_var corbaRef_m;
00195
00200 Logging::RepeatGuardLogger<Logging::BaseLog> guardbl_m;
00201 };
00202
00203 #endif