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
37 const CORBA::Any
& data
41 Simple_Test
* test_client_
;
44 /***************************************************************************/
46 class Event_AnyPushSupplier
: public TAO_Notify_Tests_PushSupplier
50 Event_AnyPushSupplier (Simple_Test
* test_client
);
53 virtual ~Event_AnyPushSupplier (void);
56 Simple_Test
* test_client_
;
59 /***************************************************************************/
61 class Simple_Test
: public Notify_Test_Client
64 // Initialization and termination code
66 virtual ~Simple_Test (void);
68 int parse_args (int argc
,
75 /// Called when an event is received.
76 void on_event_received (void);
84 /// check if we got the expected results.
85 int check_results (void);
89 void create_EC (void);
91 /// Number of events received so far.
92 ACE_Atomic_Op
<TAO_SYNCH_MUTEX
, int> result_count_
;
94 /// Number of events to send
97 /// The one channel that we create using the factory.
98 CosNotifyChannelAdmin::EventChannel_var ec_
;
100 /// The consumer admin used by consumers.
101 CosNotifyChannelAdmin::ConsumerAdmin_var consumer_admin_
;
103 /// The supplier admin used by suppliers.
104 CosNotifyChannelAdmin::SupplierAdmin_var supplier_admin_
;
107 TAO_Notify_Tests_PushConsumer
* consumer_
;
110 TAO_Notify_Tests_PushSupplier
* supplier_
;
113 friend class Event_AnyPushSupplier
;
114 friend class Event_AnyPushConsumer
;
117 /***************************************************************************/
119 #if defined(_MSC_VER)
121 #endif /* _MSC_VER */
123 #endif /* NOTIFY_TESTS_SIMPLE_H */