3 // ============================================================================
5 * @file Notify_Consumer.h
7 * An example of using the Notify_Logging_Service.
8 * The Notify_Consumer consumes log-generated events.
10 * @author D A Hanvey (d.hanvey@qub.ac.uk)
12 // ============================================================================
14 #ifndef NOTIFY_CONSUMER_H
15 #define NOTIFY_CONSUMER_H
17 #include "orbsvcs/DsNotifyLogAdminS.h"
18 #include "orbsvcs/DsEventLogAdminC.h"
19 #include "orbsvcs/CosEventCommS.h"
20 #include "orbsvcs/CosNotifyCommS.h"
21 #include "orbsvcs/CosNamingC.h"
23 #if !defined (ACE_LACKS_PRAGMA_ONCE)
25 #endif /* ACE_LACKS_PRAGMA_ONCE */
28 : public POA_CosNotifyComm::PushConsumer
31 // Simple consumer object
34 // This class is a consumer of log generated events.
40 int run (int argc
, ACE_TCHAR
* argv
[]);
44 CosNotifyChannelAdmin::ProxyID proxy_supplier_id_
;
45 // The proxy_supplier id.
49 // = NotifyPublish method
50 virtual void offer_change (
51 const CosNotification::EventTypeSeq
& added
,
52 const CosNotification::EventTypeSeq
& removed
);
54 // = StructuredPushSupplier methods
55 virtual void push (const CORBA::Any
&event
);
58 virtual void disconnect_push_consumer ();
61 CORBA::ULong event_count_
;
62 // Keep track of the number of events received.
66 // The ORB that we use.
68 CosNaming::NamingContext_var naming_context_
;
69 // Handle to the name service.
71 DsNotifyLogAdmin::NotifyLogFactory_var notify_log_factory_
;
73 CosNotifyChannelAdmin::ProxyPushSupplier_var proxy_supplier_
;
78 #endif /* NOTIFY_CONSUMER_H */