00001 // -*- C++ -*- 00002 //============================================================================= 00003 /** 00004 * @file Validate_Client_Task.h 00005 * 00006 * $Id: Validate_Client_Task.h 84733 2009-03-05 23:54:36Z mesnier_p $ 00007 * 00008 * @author Yan Dai (dai_y@ociweb.com) 00009 */ 00010 //============================================================================= 00011 00012 #ifndef NOTIFY_VALIDATE_CLIENT_TASK_H 00013 #define NOTIFY_VALIDATE_CLIENT_TASK_H 00014 00015 #include /**/ "ace/pre.h" 00016 00017 #include "notify_serv_export.h" 00018 00019 #include "tao/ORB.h" 00020 #include "tao/Condition.h" 00021 00022 #include "ace/Task.h" 00023 00024 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00025 # pragma once 00026 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00027 00028 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00029 00030 class TAO_Notify_EventChannelFactory; 00031 00032 00033 /** 00034 * @class TAO_Notify_validate_client_Task 00035 * 00036 * @brief ClientControl 00037 * 00038 * Defines the interface for the consumer control strategy. 00039 * This strategy handles misbehaving or failing consumers. 00040 * = MEMORY MANAGMENT 00041 * = LOCKING 00042 * = TODO 00043 */ 00044 class TAO_Notify_Serv_Export TAO_Notify_validate_client_Task 00045 : public ACE_Task<ACE_NULL_SYNCH> 00046 { 00047 public: 00048 00049 typedef TAO_Condition<TAO_SYNCH_MUTEX> CONDITION; 00050 00051 /// Constructor. It does not assume ownership of the <event_channel> 00052 /// parameter. 00053 TAO_Notify_validate_client_Task (const ACE_Time_Value &delay, 00054 const ACE_Time_Value &interval, 00055 TAO_Notify_EventChannelFactory *ecf); 00056 00057 /// destructor... 00058 virtual ~TAO_Notify_validate_client_Task (void); 00059 00060 virtual int svc (void); 00061 00062 void shutdown (void); 00063 00064 private: 00065 /// The delay of first time validate. 00066 ACE_Time_Value delay_; 00067 00068 /// The validate interval 00069 ACE_Time_Value interval_; 00070 00071 /// The event channel 00072 TAO_Notify_EventChannelFactory *ecf_; 00073 00074 CONDITION condition_; 00075 00076 bool shutdown_; 00077 }; 00078 00079 TAO_END_VERSIONED_NAMESPACE_DECL 00080 00081 #include /**/ "ace/post.h" 00082 00083 #endif /* NOTIFY_VALIDATE_CLIENT_TASK_H */ 00084