2 //=============================================================================
6 * Test Sequence support in Notification.
8 * @author Pradeep Gore <pradeep@cs.wustl.edu>
10 //=============================================================================
13 #ifndef NOTIFY_TESTS_SEQUENCE_H
14 #define NOTIFY_TESTS_SEQUENCE_H
16 #include "Notify_Test_Client.h"
17 #include "Notify_SequencePushConsumer.h"
18 #include "Notify_SequencePushSupplier.h"
19 #include "orbsvcs/TimeBaseC.h"
23 #pragma warning(disable:4250)
28 class SequencePushConsumer
: public TAO_Notify_Tests_SequencePushConsumer
31 SequencePushConsumer (Sequence
* client
);
33 // = SequencePushConsumer methods
34 virtual void push_structured_events (
35 const CosNotification::EventBatch
& notifications
39 Sequence
* test_client_
;
42 /***************************************************************************/
44 class SequencePushSupplier
: public TAO_Notify_Tests_SequencePushSupplier
48 SequencePushSupplier (Sequence
* test_client
);
51 virtual ~SequencePushSupplier (void);
54 Sequence
* test_client_
;
57 /***************************************************************************/
59 class Sequence
: public Notify_Test_Client
62 // Initialization and termination code.
64 virtual ~Sequence (void);
66 int parse_args (int argc
,
73 /// Called when an event is received.
74 void on_event_received (void);
82 /// check if we got the expected results.
83 int check_results (void);
87 void create_EC (void);
89 /// Number of events to send
92 /// Batch size send by supplier.
93 CORBA::ULong supplier_batch_size_
;
95 /// Max Batch size expected by consumer.
96 CORBA::ULong consumer_batch_size_
;
98 TimeBase::TimeT pacing_
;
100 CORBA::Short order_policy_
;
102 /// Count the number of events received by the consumer.
103 ACE_Atomic_Op
<TAO_SYNCH_MUTEX
, int> events_received_
;
105 ACE_Time_Value consumer_delay_
;
107 /// The one channel that we create using the factory.
108 CosNotifyChannelAdmin::EventChannel_var ec_
;
110 /// The consumer admin used by consumers.
111 CosNotifyChannelAdmin::ConsumerAdmin_var consumer_admin_
;
113 /// The supplier admin used by suppliers.
114 CosNotifyChannelAdmin::SupplierAdmin_var supplier_admin_
;
117 TAO_Notify_Tests_SequencePushConsumer
* consumer_
;
120 TAO_Notify_Tests_SequencePushSupplier
* supplier_
;
123 friend class SequencePushSupplier
;
124 friend class SequencePushConsumer
;
127 /***************************************************************************/
129 #if defined(_MSC_VER)
131 #endif /* _MSC_VER */
133 #endif /* NOTIFY_TESTS_SEQUENCE_H */