summaryrefslogtreecommitdiff
path: root/TAO/tests/LongWrites/Sender.h
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/LongWrites/Sender.h')
-rw-r--r--TAO/tests/LongWrites/Sender.h33
1 files changed, 32 insertions, 1 deletions
diff --git a/TAO/tests/LongWrites/Sender.h b/TAO/tests/LongWrites/Sender.h
index 0bcbea6d50e..65fc76516d4 100644
--- a/TAO/tests/LongWrites/Sender.h
+++ b/TAO/tests/LongWrites/Sender.h
@@ -22,14 +22,36 @@ class Sender
{
public:
/// Constructor
- Sender (void);
+ Sender (int test_type);
/// Destructor
virtual ~Sender (void);
+ /// Control the type of test
+ enum {
+ /// Run the test using receive_data_oneway() operations
+ TEST_ONEWAY,
+ /// Run the test using receive_data() operations
+ TEST_WRITE,
+ /// Run the test using return_data() operations
+ TEST_READ_WRITE,
+ };
+
+ /// Run the test in a separate thread
+ int run_test (CORBA::Long event_count,
+ CORBA::ULong event_size);
+
+ /// Return 1 after <shutdown> is invoked and all the messages are
+ /// received.
+ int test_done (CORBA::ULong message_count);
+
/// Return 1 after <shutdown> is invoked
int shutdown_called (void);
+ /// Return 1 if the test is finished, assuming <message_count>
+ /// messages have been received by the local Receiver
+ int iteration_done (CORBA::ULong messsage_count);
+
// = The skeleton methods
virtual void add_receiver (Test::Receiver_ptr receiver,
CORBA::Environment &ACE_TRY_ENV)
@@ -42,13 +64,22 @@ public:
ACE_THROW_SPEC ((CORBA::SystemException));
private:
+ /// The type of test
+ int test_type_;
+
+ /// Synchronize the internal state
ACE_SYNCH_MUTEX mutex_;
+ /// Keep track of all the receivers
size_t receiver_count_;
size_t receiver_length_;
Test::Receiver_var *receivers_;
+ /// Set to 1 if the shutdown() operations was called.
int shutdown_called_;
+
+ /// Setup event count
+ CORBA::ULong event_count_;
};
#if defined(_MSC_VER) && (_MSC_VER >= 1200)