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
[]);
50 // The ORB that we use.
52 CosNaming::NamingContext_var naming_context_
;
53 // Handle to the name service.
55 DsNotifyLogAdmin::NotifyLogFactory_var notify_log_factory_
;
56 // The notify log factory from the Log Service.
58 DsNotifyLogAdmin::NotifyLog_var notify_log_
;
60 Filter_StructuredPushSupplier
* supplier_1
;
62 CosNotifyChannelAdmin::SupplierAdmin_var supplier_admin_
;
65 class Filter_StructuredPushSupplier
66 : public POA_CosNotifyComm::StructuredPushSupplier
69 // Filter_StructuredPushSupplier
72 // Supplier for the filter example.
75 Filter_StructuredPushSupplier (void);
78 void connect (CosNotifyChannelAdmin::SupplierAdmin_ptr supplier_admin
);
79 // Connect the Supplier to the EventChannel.
80 // Creates a new proxy supplier and connects to it.
82 void disconnect (void);
83 // Disconnect from the supplier.
85 virtual void send_event (const CosNotification::StructuredEvent
& event
);
90 CosNotifyChannelAdmin::StructuredProxyPushConsumer_var proxy_consumer_
;
91 // The proxy that we are connected to.
93 CosNotifyChannelAdmin::ProxyID proxy_consumer_id_
;
94 // This supplier's id.
96 // = Protected Methods
97 virtual ~Filter_StructuredPushSupplier ();
101 virtual void subscription_change (
102 const CosNotification::EventTypeSeq
& added
,
103 const CosNotification::EventTypeSeq
& removed
);
105 // = StructuredPushSupplier method
106 virtual void disconnect_structured_push_supplier ();
110 #endif /* NOTIFY_SUPPLIER_H */