2 //=============================================================================
6 * Test to check if events are received by all 3 types of consumers.
7 * This is intended to be a simple test without any filters with default subscription (all events).
9 * @author Pradeep Gore <pradeep@cs.wustl.edu>
11 //=============================================================================
14 #ifndef NOTIFY_TESTS_EventS_H
15 #define NOTIFY_TESTS_EventS_H
17 #include "Notify_Test_Client.h"
18 #include "Notify_StructuredPushConsumer.h"
19 #include "Notify_StructuredPushSupplier.h"
23 #pragma warning(disable:4250)
28 class Event_StructuredPushConsumer
: public TAO_Notify_Tests_StructuredPushConsumer
32 Event_StructuredPushConsumer (Events
*test_client
);
34 // = StructuredPushSupplier methods.
35 virtual void push_structured_event (
36 const CosNotification::StructuredEvent
& notification
);
39 Events
* test_client_
;
42 /***************************************************************************/
44 class Event_StructuredPushSupplier
: public TAO_Notify_Tests_StructuredPushSupplier
48 Event_StructuredPushSupplier (Events
* test_client
);
51 virtual ~Event_StructuredPushSupplier ();
57 /***************************************************************************/
59 class Events
: public Notify_Test_Client
62 // Initialization and termination code.
66 int parse_args (int argc
,
73 /// Called when an event is received.
74 void on_event_received ();
82 /// check if we got the expected results.
89 /// Number of events received so far.
90 ACE_Atomic_Op
<TAO_SYNCH_MUTEX
, int> result_count_
;
92 /// Use the default admins.
93 int use_default_admin_
;
95 /// Number of events to send
98 /// The one channel that we create using the factory.
99 CosNotifyChannelAdmin::EventChannel_var ec_
;
101 /// The consumer admin used by consumers.
102 CosNotifyChannelAdmin::ConsumerAdmin_var consumer_admin_
;
104 /// The supplier admin used by suppliers.
105 CosNotifyChannelAdmin::SupplierAdmin_var supplier_admin_
;
108 TAO_Notify_Tests_StructuredPushConsumer
* consumer_
;
111 TAO_Notify_Tests_StructuredPushSupplier
* supplier_
;
114 friend class Event_StructuredPushSupplier
;
115 friend class Event_StructuredPushConsumer
;
118 /***************************************************************************/
120 #if defined(_MSC_VER)
122 #endif /* _MSC_VER */
124 #endif /* NOTIFY_TESTS_EventS_H */