EC_Reactive_Timeout_Generator.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 /**
00004  *  @file   EC_Reactive_Timeout_Generator.h
00005  *
00006  *  EC_Reactive_Timeout_Generator.h,v 1.13 2006/03/14 06:14:25 jtc Exp
00007  *
00008  *  @author Carlos O'Ryan (coryan@cs.wustl.edu)
00009  *
00010  * Based on previous work by Tim Harrison (harrison@cs.wustl.edu) and
00011  * other members of the DOC group. More details can be found in:
00012  *
00013  * http://doc.ece.uci.edu/~coryan/EC/index.html
00014  */
00015 
00016 #ifndef TAO_EC_REACTIVE_TIMEOUT_GENERATOR_H
00017 #define TAO_EC_REACTIVE_TIMEOUT_GENERATOR_H
00018 
00019 #include /**/ "ace/pre.h"
00020 
00021 #include "orbsvcs/Event/EC_Timeout_Generator.h"
00022 
00023 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00024 # pragma once
00025 #endif /* ACE_LACKS_PRAGMA_ONCE */
00026 
00027 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00028 
00029 /**
00030  * @class TAO_EC_Reactive_Timeout_Generator
00031  *
00032  * @brief A simple implementation of the Timeout_Generator based on the
00033  * Reactor.
00034  *
00035  * Implements the Timeout_Generator using an ACE_Reactor. Usually
00036  * the same reactor that is used by the ORB where the EC runs.
00037  */
00038 class TAO_RTEvent_Serv_Export TAO_EC_Reactive_Timeout_Generator
00039   : public TAO_EC_Timeout_Generator
00040 {
00041 public:
00042   /// Constructor.
00043   /// If <reactor> is 0 then we use the reactor in the ORB singleton.
00044   TAO_EC_Reactive_Timeout_Generator (ACE_Reactor *reactor = 0);
00045 
00046   /// destructor
00047   virtual ~TAO_EC_Reactive_Timeout_Generator (void);
00048 
00049   // = The TAO_EC_Timeout_Generator methods.
00050   virtual void activate (void);
00051   virtual void shutdown (void);
00052   virtual int schedule_timer (TAO_EC_Timeout_Filter* filter,
00053                               const ACE_Time_Value& delta,
00054                               const ACE_Time_Value& interval);
00055   virtual int cancel_timer (const TAO_EC_QOS_Info& info,
00056                             int id);
00057 
00058 private:
00059   /// The reactor
00060   ACE_Reactor *reactor_;
00061 
00062   /// An adapter to receive the timeout events.
00063   TAO_EC_Timeout_Adapter event_handler_;
00064 };
00065 
00066 TAO_END_VERSIONED_NAMESPACE_DECL
00067 
00068 #include /**/ "ace/post.h"
00069 
00070 #endif /* TAO_EC_REACTIVE_TIMEOUT_GENERATOR_H */

Generated on Thu Nov 9 13:11:09 2006 for TAO_RTEvent by doxygen 1.3.6