diff options
Diffstat (limited to 'TAO/orbsvcs/tests/CosEvent/Timeout/TestEventConsumer_i.h')
-rw-r--r-- | TAO/orbsvcs/tests/CosEvent/Timeout/TestEventConsumer_i.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/TAO/orbsvcs/tests/CosEvent/Timeout/TestEventConsumer_i.h b/TAO/orbsvcs/tests/CosEvent/Timeout/TestEventConsumer_i.h new file mode 100644 index 00000000000..2f97247ece0 --- /dev/null +++ b/TAO/orbsvcs/tests/CosEvent/Timeout/TestEventConsumer_i.h @@ -0,0 +1,46 @@ +/* -*- C++ -*- */ +// $Id$ + +#ifndef TestEventConsumer_i_h_ +#define TestEventConsumer_i_h_ + +#include "orbsvcs/CosEventCommS.h" + +#include "ace/Task.h" +#include "ace/Condition_T.h" + +class TestEventConsumer_i : public virtual POA_CosEventComm::PushConsumer +{ +public: + TestEventConsumer_i (CORBA::ORB_ptr orb, bool hang); + + // Override operations from PushConsumer interface. + virtual void push (const CORBA::Any & data) + throw (CORBA::SystemException, CosEventComm::Disconnected); + + virtual void disconnect_push_consumer () throw (CORBA::SystemException); + + void activate (); + + struct ORB_task : ACE_Task_Base + { + ORB_task (CORBA::ORB_ptr orb) : orb_ (CORBA::ORB::_duplicate (orb)) + {} + + CORBA::ORB_var orb_; + + int svc (); + }; + +private: + CORBA::ORB_var orb_; + bool hang_; + unsigned count_; + ORB_task orbtask_; + + TAO_SYNCH_MUTEX mtx_; + ACE_Condition<TAO_SYNCH_MUTEX> cond_; + bool shutdown_; +}; + +#endif |