3 // ============================================================================
5 * @file Notify_Supplier.h
7 * An example of using the Notify_Logging_Service.
9 * @author D A Hanvey (d.hanvey@qub.ac.uk)
11 // ============================================================================
13 #ifndef NOTIFY_SUPPLIER_H
14 #define NOTIFY_SUPPLIER_H
16 #include "orbsvcs/CosNotifyChannelAdminS.h"
17 #include "orbsvcs/DsNotifyLogAdminC.h"
18 #include "orbsvcs/CosNamingC.h"
19 #include "orbsvcs/CosNotifyCommS.h"
22 class Filter_StructuredPushSupplier
;
24 #if !defined (ACE_LACKS_PRAGMA_ONCE)
26 #endif /* ACE_LACKS_PRAGMA_ONCE */
31 // Simple supplier object
34 // This class is a supplier of events.
43 int run (int argc
, ACE_TCHAR
* argv
[]);
49 // The ORB that we use.
51 CosNaming::NamingContext_var naming_context_
;
52 // Handle to the name service.
54 DsNotifyLogAdmin::NotifyLogFactory_var notify_log_factory_
;
55 // The notify log factory from the Log Service.
57 DsNotifyLogAdmin::NotifyLog_var notify_log_
;
59 Filter_StructuredPushSupplier
* supplier_1
;
61 CosNotifyChannelAdmin::SupplierAdmin_var supplier_admin_
;
64 class Filter_StructuredPushSupplier
65 : public POA_CosNotifyComm::StructuredPushSupplier
68 // Filter_StructuredPushSupplier
71 // Supplier for the filter example.
74 Filter_StructuredPushSupplier ();
77 void connect (CosNotifyChannelAdmin::SupplierAdmin_ptr supplier_admin
);
78 // Connect the Supplier to the EventChannel.
79 // Creates a new proxy supplier and connects to it.
82 // Disconnect from the supplier.
84 virtual void send_event (const CosNotification::StructuredEvent
& event
);
89 CosNotifyChannelAdmin::StructuredProxyPushConsumer_var proxy_consumer_
;
90 // The proxy that we are connected to.
92 CosNotifyChannelAdmin::ProxyID proxy_consumer_id_
;
93 // This supplier's id.
95 // = Protected Methods
96 virtual ~Filter_StructuredPushSupplier ();
100 virtual void subscription_change (
101 const CosNotification::EventTypeSeq
& added
,
102 const CosNotification::EventTypeSeq
& removed
);
104 // = StructuredPushSupplier method
105 virtual void disconnect_structured_push_supplier ();
109 #endif /* NOTIFY_SUPPLIER_H */