Timer_Reactor.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 /**
00004  *  @file Timer_Reactor.h
00005  *
00006  *  Timer_Reactor.h,v 1.12 2006/03/14 06:14:34 jtc Exp
00007  *
00008  *  @author Pradeep Gore <pradeep@oomworks.com>
00009  */
00010 
00011 #ifndef TAO_Notify_TIMER_REACTOR_H
00012 #define TAO_Notify_TIMER_REACTOR_H
00013 #include /**/ "ace/pre.h"
00014 
00015 #include "orbsvcs/Notify/notify_serv_export.h"
00016 #include "orbsvcs/Notify/Timer.h"
00017 
00018 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00019 # pragma once
00020 #endif /* ACE_LACKS_PRAGMA_ONCE */
00021 
00022 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00023 class ACE_Reactor;
00024 ACE_END_VERSIONED_NAMESPACE_DECL
00025 
00026 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00027 
00028 /**
00029  * @class TAO_Notify_Timer_Reactor
00030  *
00031  * @brief Reactor::instance based timer. The timers are dispatched by
00032  *        the main thread.
00033  */
00034 class TAO_Notify_Serv_Export TAO_Notify_Timer_Reactor : public TAO_Notify_Timer
00035 {
00036 public:
00037   typedef TAO_Notify_Refcountable_Guard_T< TAO_Notify_Timer_Reactor > Ptr;
00038 
00039   /// Constuctor
00040   TAO_Notify_Timer_Reactor (void);
00041 
00042   /// Destructor
00043   virtual ~TAO_Notify_Timer_Reactor ();
00044 
00045 
00046   /// Schedule a timer
00047   virtual long schedule_timer (ACE_Event_Handler *handler,
00048                                const ACE_Time_Value &delay_time,
00049                                const ACE_Time_Value &interval);
00050 
00051   /// Cancel Timer
00052   virtual int cancel_timer (long timer_id);
00053 
00054 protected:
00055   /// The instance reactor that we use.
00056   ACE_Reactor* reactor_;
00057 
00058 private:
00059   /// Release
00060   virtual void release (void);
00061 };
00062 
00063 TAO_END_VERSIONED_NAMESPACE_DECL
00064 
00065 #include /**/ "ace/post.h"
00066 #endif /* TAO_Notify_TIMER_REACTOR_H */

Generated on Thu Nov 9 13:24:17 2006 for TAO_CosNotification by doxygen 1.3.6