00001 // $Id: Control.h 90164 2010-05-18 21:47:55Z mitza $ 00002 00003 #ifndef CONTROL_H 00004 #define CONTROL_H 00005 00006 #include /**/ "ace/pre.h" 00007 00008 #include "ace/SString.h" 00009 00010 #include "tao/Versioned_Namespace.h" 00011 00012 #include "orbsvcs/Notify/MonitorControl/notify_mc_export.h" 00013 00014 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00015 00016 #define TAO_NS_CONTROL_SHUTDOWN "shutdown" 00017 #define TAO_NS_CONTROL_REMOVE_CONSUMER "remove_consumer" 00018 #define TAO_NS_CONTROL_REMOVE_SUPPLIER "remove_supplier" 00019 #define TAO_NS_CONTROL_REMOVE_CONSUMERADMIN "remove_consumeradmin" 00020 #define TAO_NS_CONTROL_REMOVE_SUPPLIERADMIN "remove_supplieradmin" 00021 00022 class TAO_Notify_MC_Export TAO_NS_Control 00023 { 00024 public: 00025 /// This is here due to virtual functions. 00026 virtual ~TAO_NS_Control (void); 00027 00028 /// Return the name of this control object. 00029 const ACE_CString& name (void) const; 00030 00031 /// Execute the control object. Only return false if the command 00032 /// specified is not supported. 00033 virtual bool execute (const char* command) = 0; 00034 00035 protected: 00036 /// Construct a control object. 00037 TAO_NS_Control (const char* name); 00038 00039 private: 00040 ACE_CString name_; 00041 }; 00042 00043 TAO_END_VERSIONED_NAMESPACE_DECL 00044 00045 #include /**/ "ace/post.h" 00046 00047 #endif /* CONTROL_H */