summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/FtRtEvent/PushSupplier.h
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/tests/FtRtEvent/PushSupplier.h')
-rw-r--r--TAO/orbsvcs/tests/FtRtEvent/PushSupplier.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/TAO/orbsvcs/tests/FtRtEvent/PushSupplier.h b/TAO/orbsvcs/tests/FtRtEvent/PushSupplier.h
new file mode 100644
index 00000000000..a425411e6df
--- /dev/null
+++ b/TAO/orbsvcs/tests/FtRtEvent/PushSupplier.h
@@ -0,0 +1,63 @@
+// -*- C++ -*-
+//=============================================================================
+/**
+ * @file PushSupplier.h
+ *
+ * $Id$
+ *
+ * @author Huang-Ming Huang <hh1@cse.wustl.edu>
+ */
+//=============================================================================
+
+#ifndef PUSHSUPPLIER_H
+#define PUSHSUPPLIER_H
+
+#include "orbsvcs/RtecEventCommS.h"
+#include "orbsvcs/RtecEventChannelAdminC.h"
+#include "ace/Event_Handler.h"
+#include "ace/Task.h"
+#include "ace/Reactor.h"
+#include "ace/Time_Value.h"
+
+class ACE_Reactor;
+
+class PushSupplier_impl :
+public ACE_Event_Handler
+,public virtual POA_RtecEventComm::PushSupplier
+{
+public:
+ PushSupplier_impl(CORBA::ORB_ptr orb);
+ ~PushSupplier_impl();
+
+ int init(RtecEventChannelAdmin::EventChannel_ptr ACE_ENV_ARG_DECL);
+
+ virtual void disconnect_push_supplier (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+private:
+
+ class ReactorTask : public ACE_Task_Base
+ {
+ public:
+ // ctor
+ ReactorTask(ACE_Event_Handler* handler) : handler_(handler){}
+ virtual int svc (void);
+ // The thread entry point.
+
+ ACE_Reactor* reactor_;
+ ACE_Event_Handler* handler_;
+ };
+
+ virtual int handle_timeout (const ACE_Time_Value &current_time,
+ const void *act = 0);
+ CORBA::ORB_var orb_;
+ CORBA::ULong seq_no_;
+ ReactorTask reactor_task_;
+ RtecEventChannelAdmin::ProxyPushConsumer_var consumer_;
+ PushSupplier_impl(const PushSupplier_impl&);
+ void operator==(const PushSupplier_impl&);
+};
+#endif