2 //=============================================================================
6 * Simple test any supplier to any consumer.
8 * @author Pradeep Gore <pradeep@cs.wustl.edu>
10 //=============================================================================
13 #ifndef NOTIFY_TESTS_SIMPLE_H
14 #define NOTIFY_TESTS_SIMPLE_H
16 #include "Notify_Test_Client.h"
17 #include "Notify_PushConsumer.h"
18 #include "Notify_PushSupplier.h"
22 #pragma warning(disable:4250)
27 /***************************************************************************/
29 class Event_AnyPushConsumer
: public TAO_Notify_Tests_PushConsumer
33 Event_AnyPushConsumer (Simple_Test
*test_client
);
35 // = PushSupplier methods
36 virtual void push (const CORBA::Any
& data
);
39 Simple_Test
* test_client_
;
42 /***************************************************************************/
44 class Event_AnyPushSupplier
: public TAO_Notify_Tests_PushSupplier
48 Event_AnyPushSupplier (Simple_Test
* test_client
);
51 virtual ~Event_AnyPushSupplier ();
54 Simple_Test
* test_client_
;
57 /***************************************************************************/
59 class Simple_Test
: public Notify_Test_Client
62 // Initialization and termination code
64 virtual ~Simple_Test ();
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 /// Number of events to send
95 /// The one channel that we create using the factory.
96 CosNotifyChannelAdmin::EventChannel_var ec_
;
98 /// The consumer admin used by consumers.
99 CosNotifyChannelAdmin::ConsumerAdmin_var consumer_admin_
;
101 /// The supplier admin used by suppliers.
102 CosNotifyChannelAdmin::SupplierAdmin_var supplier_admin_
;
105 TAO_Notify_Tests_PushConsumer
* consumer_
;
108 TAO_Notify_Tests_PushSupplier
* supplier_
;
111 friend class Event_AnyPushSupplier
;
112 friend class Event_AnyPushConsumer
;
115 /***************************************************************************/
117 #if defined(_MSC_VER)
119 #endif /* _MSC_VER */
121 #endif /* NOTIFY_TESTS_SIMPLE_H */