diff options
Diffstat (limited to 'TAO/tests/AMI_Timeouts/timeout_i.h')
-rw-r--r-- | TAO/tests/AMI_Timeouts/timeout_i.h | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/TAO/tests/AMI_Timeouts/timeout_i.h b/TAO/tests/AMI_Timeouts/timeout_i.h new file mode 100644 index 00000000000..d4082ac05d2 --- /dev/null +++ b/TAO/tests/AMI_Timeouts/timeout_i.h @@ -0,0 +1,86 @@ +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// TAO/tests/AMI_Timeouts +// +// = FILENAME +// timeout_i.h +// +// = DESCRIPTION +// Implements the CORBA object. +// +// = AUTHOR +// Michael Kircher <Michael.Kircher@mchp.siemens.de> +// +// ============================================================================ + +#ifndef TIMEOUT_I_H +#define TIMEOUT_I_H + +#include "ace/High_Res_Timer.h" + +#include "timeoutS.h" + +class Timeout_i +: public POA_TimeoutObj +{ +public: + Timeout_i (CORBA::ORB_ptr orb); + + ~Timeout_i (); + + virtual void sendTimeToWait (CORBA::Long msec + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + +private: + + CORBA::ORB_var orb_; +}; + +class TimeoutHandler_i +: public POA_AMI_TimeoutObjHandler +{ +public: + TimeoutHandler_i (); + + ~TimeoutHandler_i (); + + virtual void sendTimeToWait (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + virtual void sendTimeToWait_excep ( + ::Messaging::ExceptionHolder * excep_holder + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + void reset_reply_counter (); + + void reset_reply_excep_counter (); + + unsigned short reply_counter (); + + unsigned short reply_excep_counter (); + + /// Start the time measurement + void start (); + + /// Return the elapsed time + ACE_Time_Value &elapsed_time (); + +private: + unsigned short reply_counter_; + + unsigned short reply_excep_counter_; + + ACE_High_Res_Timer timer_; + + ACE_Time_Value elapsed_time_; +}; + +#endif /* TIMEOUT_I_H */ |