00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file Transport_Timer.h 00006 * 00007 * $Id: Transport_Timer.h 74014 2006-08-14 13:52:22Z johnnyw $ 00008 * 00009 * @author Carlos O'Ryan <coryan@uci.edu> 00010 */ 00011 //============================================================================= 00012 00013 #ifndef TAO_TRANSPORT_TIMER_H 00014 #define TAO_TRANSPORT_TIMER_H 00015 00016 #include /**/ "ace/pre.h" 00017 #include "ace/Event_Handler.h" 00018 00019 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00020 # pragma once 00021 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00022 00023 #include /**/ "tao/TAO_Export.h" 00024 #include /**/ "tao/Versioned_Namespace.h" 00025 00026 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00027 00028 class TAO_Transport; 00029 00030 /** 00031 * @class TAO_Transport_Timer 00032 * 00033 * @brief Allows TAO_Transport instances to receive timeout 00034 * notifications from the Reactor. In other words, implements 00035 * the Adapter Role, of the Adapter Pattern, where the Adaptee 00036 * is a TAO_Transport and the client is the Reactor. 00037 * 00038 */ 00039 class TAO_Transport_Timer : public ACE_Event_Handler 00040 { 00041 public: 00042 /// Constructor 00043 /** 00044 * @param transport The adaptee 00045 */ 00046 TAO_Transport_Timer (TAO_Transport *transport); 00047 00048 /// Receive timeout events from the Reactor and forward them to the 00049 /// TAO_Transport 00050 virtual int handle_timeout (const ACE_Time_Value ¤t_time, 00051 const void *act); 00052 private: 00053 /// The Adaptee 00054 TAO_Transport *transport_; 00055 }; 00056 00057 TAO_END_VERSIONED_NAMESPACE_DECL 00058 00059 #include /**/ "ace/post.h" 00060 00061 #endif /* TAO_TRANSPORT_TIMER_H */