summaryrefslogtreecommitdiff
path: root/TAO/tests/Big_Request_Muxing/Client_Task.h
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/Big_Request_Muxing/Client_Task.h')
-rw-r--r--TAO/tests/Big_Request_Muxing/Client_Task.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/TAO/tests/Big_Request_Muxing/Client_Task.h b/TAO/tests/Big_Request_Muxing/Client_Task.h
new file mode 100644
index 00000000000..8bb3bc69cfb
--- /dev/null
+++ b/TAO/tests/Big_Request_Muxing/Client_Task.h
@@ -0,0 +1,56 @@
+//
+// $Id$
+//
+
+#ifndef BIG_REQUEST_MUXING_CLIENT_TASK_H
+#define BIG_REQUEST_MUXING_CLIENT_TASK_H
+#include "ace/pre.h"
+
+#include "TestC.h"
+// #include "tao/Messaging.h"
+#include "ace/Task.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+/// Implement a Task to run the experiments using multiple threads.
+class Client_Task : public ACE_Task_Base
+{
+public:
+ /// Constructor
+ Client_Task (ACE_Thread_Manager *thr_mgr,
+ Test::Payload_Receiver_ptr receiver,
+ CORBA::Long event_count,
+ CORBA::ULong event_size,
+ CORBA::ORB_ptr orb,
+ Messaging::SyncScope sync_scope);
+
+ /// Thread entry point
+ int svc (void);
+
+private:
+ /// Make sure that all threads have connections available to
+ /// workaround bug 189
+ void validate_connection (CORBA::Environment &ACE_TRY_ENV);
+
+private:
+ /// Reference to the test interface
+ Test::Payload_Receiver_var payload_receiver_;
+
+ /// Total number of events
+ CORBA::Long event_count_;
+
+ /// Size of each message
+ CORBA::ULong event_size_;
+
+ /// Keep a reference to the ORB, used to initialize the SyncScope
+ /// policy
+ CORBA::ORB_var orb_;
+
+ /// The SyncScope used in this Task
+ Messaging::SyncScope sync_scope_;
+};
+
+#include "ace/post.h"
+#endif /* BIG_REQUEST_MUXING_CLIENT_TASK_H */