3 //=============================================================================
5 * @file Asynch_Timeout_Handler.h
7 * Timeout Handler for AMI timeouts
9 * @author Michael Kircher <Michael.Kircher@mchp.siemens.de>
11 //=============================================================================
14 #ifndef TAO_ASYNCH_TIMEOUT_HANDLER_H
15 #define TAO_ASYNCH_TIMEOUT_HANDLER_H
17 #include /**/ "ace/pre.h"
19 #include "tao/Messaging/messaging_export.h"
21 #if !defined (ACE_LACKS_PRAGMA_ONCE)
23 #endif /* ACE_LACKS_PRAGMA_ONCE */
25 #include "tao/orbconf.h"
26 #include "tao/Basic_Types.h"
28 #include "ace/Event_Handler.h"
30 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
32 class TAO_Transport_Mux_Strategy
;
35 * @class TAO_Asynch_Timeout_Handler
37 * @brief Handler registered with the reactor in case of AMI timeouts.
39 class TAO_Asynch_Timeout_Handler
40 : public ACE_Event_Handler
43 TAO_Asynch_Timeout_Handler (ACE_Reactor
*reactor
);
45 ~TAO_Asynch_Timeout_Handler () = default;
48 long schedule_timer (TAO_Transport_Mux_Strategy
*tms
,
49 CORBA::ULong request_id
,
50 const ACE_Time_Value
&max_wait_time
);
52 /// Invoked by the reactor on timeout
53 virtual int handle_timeout (const ACE_Time_Value
¤t_time
,
56 /// Cancel this timer, remove it from the reactor
57 virtual void cancel ();
60 /// The transport mux strategy dispatching the reply
61 TAO_Transport_Mux_Strategy
*tms_
;
63 /// Remember the ID of the request.
64 CORBA::ULong request_id_
;
67 ACE_Reactor
*reactor_
;
70 TAO_END_VERSIONED_NAMESPACE_DECL
72 #include /**/ "ace/post.h"
74 #endif /* TAO_ASYNCH_TIMEOUT_HANDLER_H */