5 * @author Pradeep Gore <pradeep@oomworks.com>
8 #ifndef TAO_Notify_SUPPLIER_H
9 #define TAO_Notify_SUPPLIER_H
10 #include /**/ "ace/pre.h"
12 #include "ORB_Objects.h"
13 #include "tao/RTCORBA/RTCORBA.h"
14 #include "orbsvcs/CosNotifyChannelAdminS.h"
15 #include "orbsvcs/CosNotifyCommC.h"
16 #include "ace/SString.h"
17 #include "ace/Condition_Thread_Mutex.h"
20 * @class TAO_Notify_Lanes_Supplier
22 * @brief Implement a Structured Supplier.
24 class TAO_Notify_Lanes_Supplier
25 : public POA_CosNotifyComm::StructuredPushSupplier
29 TAO_Notify_Lanes_Supplier (TAO_Notify_ORB_Objects
& orb_objects
);
32 void init (CosNotifyChannelAdmin::SupplierAdmin_var
& admin
, int count
);
38 // = Protected Methods
40 /// Connect the Supplier to the EventChannel.
41 /// Creates a new proxy consumer and connects to it.
44 /// Disconnect the supplier.
51 virtual void send_event (const CosNotification::StructuredEvent
& event
);
54 virtual ~TAO_Notify_Lanes_Supplier ();
57 virtual void subscription_change (
58 const CosNotification::EventTypeSeq
& added
,
59 const CosNotification::EventTypeSeq
& removed
);
61 // = StructuredPushSupplier method
62 virtual void disconnect_structured_push_supplier ();
66 TAO_Notify_ORB_Objects orb_objects_
;
68 /// The proxy that we are connected to.
69 CosNotifyChannelAdmin::StructuredProxyPushConsumer_var proxy_consumer_
;
71 /// This supplier's id.
72 CosNotifyChannelAdmin::ProxyID proxy_consumer_id_
;
74 /// Number of Consumers expected to connect.
75 int expected_consumer_count_
;
77 // The ORB that we use.
81 CosNotifyChannelAdmin::SupplierAdmin_var admin_
;
83 /// Lock to serialize internal state.
84 TAO_SYNCH_MUTEX lock_
;
86 /// Condition that consumers are connected.
87 TAO_SYNCH_CONDITION consumers_connected_
;
89 /// Number of consumers connected.
93 #include /**/ "ace/post.h"
94 #endif /* TAO_Notify_SUPPLIER_H */