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
);
38 Sequence
* test_client_
;
41 /***************************************************************************/
43 class SequencePushSupplier
: public TAO_Notify_Tests_SequencePushSupplier
47 SequencePushSupplier (Sequence
* test_client
);
50 virtual ~SequencePushSupplier ();
53 Sequence
* test_client_
;
56 /***************************************************************************/
58 class Sequence
: public Notify_Test_Client
61 // Initialization and termination code.
65 int parse_args (int argc
,
72 /// Called when an event is received.
73 void on_event_received ();
81 /// check if we got the expected results.
88 /// Number of events to send
91 /// Batch size send by supplier.
92 CORBA::ULong supplier_batch_size_
;
94 /// Max Batch size expected by consumer.
95 CORBA::ULong consumer_batch_size_
;
97 TimeBase::TimeT pacing_
;
99 CORBA::Short order_policy_
;
101 /// Count the number of events received by the consumer.
102 ACE_Atomic_Op
<TAO_SYNCH_MUTEX
, int> events_received_
;
104 ACE_Time_Value consumer_delay_
;
106 /// The one channel that we create using the factory.
107 CosNotifyChannelAdmin::EventChannel_var ec_
;
109 /// The consumer admin used by consumers.
110 CosNotifyChannelAdmin::ConsumerAdmin_var consumer_admin_
;
112 /// The supplier admin used by suppliers.
113 CosNotifyChannelAdmin::SupplierAdmin_var supplier_admin_
;
116 TAO_Notify_Tests_SequencePushConsumer
* consumer_
;
119 TAO_Notify_Tests_SequencePushSupplier
* supplier_
;
122 friend class SequencePushSupplier
;
123 friend class SequencePushConsumer
;
126 /***************************************************************************/
128 #if defined(_MSC_VER)
130 #endif /* _MSC_VER */
132 #endif /* NOTIFY_TESTS_SEQUENCE_H */