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 "basencHelper.h"
00043
00047 class BaseSupplier :
public POA_acsnc::OSPushSupplier,
00048
public PortableServer::
RefCountServantBase,
00049
public BaseHelper
00050 {
00051
public:
00052
00058
BaseSupplier(
const char*
channelName,
const char* notifyServiceDomainName = 0);
00059
00063
virtual void
00064
disconnect();
00065
00070
void
00071
init(CosNaming::NamingContext_ptr nc_p);
00072
00073
00079
virtual void
00080
subscription_change(
const CosNotification::EventTypeSeq &added,
00081
const CosNotification::EventTypeSeq &removed);
00082
00087
virtual void
00088
disconnect_structured_push_supplier();
00089
00090
protected:
00094
virtual ~BaseSupplier();
00095
00102
void
00103
publishEvent(
const CosNotification::StructuredEvent& event);
00104
00109
virtual void
00110
populateHeader(CosNotification::StructuredEvent& event);
00111
00112
00117
virtual const char*
00118
getEventType() = 0;
00119
00124
virtual const char*
00125 getEventName()
00126 {
return ""; }
00127
00128
00129
00130
00131
00132
00133
00141
virtual acsnc::OSPushSupplier_ptr
00142
getCORBARef();
00143
00144
00145
00146
private:
00152
void
00153
connect();
00154
00159 CosNotifyChannelAdmin::SupplierAdmin_var
supplierAdmin_m;
00160
00164 CosNotifyChannelAdmin::StructuredProxyPushConsumer_var
proxyConsumer_m;
00165
00169 CosNotifyChannelAdmin::ProxyID
proxyConsumerID_m;
00170
00171
00172
00176 CosNotifyChannelAdmin::AdminID
adminID_m;
00177
00181 acsnc::OSPushSupplier_var
corbaRef_m;
00182 };
00183
00184
#endif