00001 // -*- C++ -*- 00002 00003 /** 00004 * @file Reactive_Task.h 00005 * 00006 * Reactive_Task.h,v 1.17 2006/03/14 06:14:34 jtc Exp 00007 * 00008 * @author Pradeep Gore <pradeep@oomworks.com> 00009 */ 00010 00011 #ifndef TAO_Notify_REACTIVE_TASK_H 00012 #define TAO_Notify_REACTIVE_TASK_H 00013 00014 #include /**/ "ace/pre.h" 00015 00016 #include "orbsvcs/Notify/notify_serv_export.h" 00017 00018 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00019 # pragma once 00020 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00021 00022 #include "orbsvcs/Notify/Worker_Task.h" 00023 #include "orbsvcs/Notify/AdminProperties.h" 00024 #include "orbsvcs/Notify/Timer_Reactor.h" 00025 00026 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00027 00028 /** 00029 * @class TAO_Notify_Reactive_Task 00030 * 00031 * @brief A reactive worker task. Simply executes the command in the 00032 * caller's context. 00033 * 00034 */ 00035 class TAO_Notify_Serv_Export TAO_Notify_Reactive_Task 00036 : public TAO_Notify_Worker_Task 00037 { 00038 public: 00039 /// Constuctor 00040 TAO_Notify_Reactive_Task (void); 00041 00042 /// Destructor 00043 virtual ~TAO_Notify_Reactive_Task (); 00044 00045 /// Init the reactive task. 00046 void init (ACE_ENV_SINGLE_ARG_DECL); 00047 00048 /// Shutdown task 00049 virtual void shutdown (void); 00050 00051 /// Exec the request. 00052 virtual void execute (TAO_Notify_Method_Request& method_request ACE_ENV_ARG_DECL); 00053 00054 /// The object used by clients to register timers. This method returns a Reactor based Timer. 00055 virtual TAO_Notify_Timer* timer (void); 00056 00057 /// Returns NULL. 00058 virtual TAO_Notify_Buffering_Strategy* buffering_strategy (void); 00059 00060 private: 00061 /// The timer. 00062 TAO_Notify_Timer_Reactor::Ptr timer_; 00063 00064 /// Release 00065 virtual void release (void); 00066 }; 00067 00068 00069 TAO_END_VERSIONED_NAMESPACE_DECL 00070 00071 #if defined (__ACE_INLINE__) 00072 #include "orbsvcs/Notify/Reactive_Task.inl" 00073 #endif /* __ACE_INLINE__ */ 00074 00075 #include /**/ "ace/post.h" 00076 00077 #endif /* TAO_Notify_REACTIVE_TASK_H */