Merge pull request #2301 from sonndinh/remove-dup-reactor-functions
[ACE_TAO.git] / TAO / tao / Transport_Timer.h
blob92b90269bce82b4d44b9e5050e07b7bd6773c302
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Transport_Timer.h
7 * @author Carlos O'Ryan <coryan@uci.edu>
8 */
9 //=============================================================================
11 #ifndef TAO_TRANSPORT_TIMER_H
12 #define TAO_TRANSPORT_TIMER_H
14 #include /**/ "ace/pre.h"
15 #include "ace/Event_Handler.h"
17 #if !defined (ACE_LACKS_PRAGMA_ONCE)
18 # pragma once
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
21 #include /**/ "tao/TAO_Export.h"
22 #include /**/ "tao/Versioned_Namespace.h"
24 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
26 class TAO_Transport;
28 /**
29 * @class TAO_Transport_Timer
31 * @brief Allows TAO_Transport instances to receive timeout
32 * notifications from the Reactor. In other words, implements
33 * the Adapter Role, of the Adapter Pattern, where the Adaptee
34 * is a TAO_Transport and the client is the Reactor.
36 class TAO_Transport_Timer : public ACE_Event_Handler
38 public:
39 /// Constructor
40 /**
41 * @param transport The adaptee
43 TAO_Transport_Timer (TAO_Transport *transport);
45 /// Receive timeout events from the Reactor and forward them to the
46 /// TAO_Transport
47 virtual int handle_timeout (const ACE_Time_Value &current_time,
48 const void *act);
49 private:
50 /// The Adaptee
51 TAO_Transport *transport_;
54 TAO_END_VERSIONED_NAMESPACE_DECL
56 #include /**/ "ace/post.h"
58 #endif /* TAO_TRANSPORT_TIMER_H */