00001 /*------------------------------------------------------------------------------ 00002 Name: DisconnectQos.h 00003 Project: xmlBlaster.org 00004 Copyright: xmlBlaster.org, see xmlBlaster-LICENSE file 00005 Comment: Handling one xmlQoS 00006 Version: $Id: DisconnectQos.h 12937 2004-11-24 20:15:11Z ruff $ 00007 ------------------------------------------------------------------------------*/ 00008 00028 #ifndef _UTIL_QOS_DISCONNECTQOS_H 00029 #define _UTIL_QOS_DISCONNECTQOS_H 00030 00031 #include <util/xmlBlasterDef.h> 00032 #include <util/I_Log.h> 00033 #include <string> 00034 #include <map> 00035 00036 namespace org { namespace xmlBlaster { namespace util { namespace qos { 00037 00038 class Dll_Export DisconnectQos 00039 { 00040 typedef std::map<std::string, std::string> ClientPropertyMap; 00041 00042 private: 00043 std::string ME; // = "DisconnectQos"; 00044 org::xmlBlaster::util::Global& global_; 00045 org::xmlBlaster::util::I_Log& log_; 00046 bool deleteSubjectQueue_; // = true; 00047 bool clearSessions_; // = false; 00048 bool clearClientQueue_; 00049 00050 protected: 00051 ClientPropertyMap clientProperties_; 00052 00053 public: 00057 DisconnectQos(org::xmlBlaster::util::Global& global); 00058 00062 DisconnectQos(const DisconnectQos& qos); 00063 00067 DisconnectQos& operator =(const DisconnectQos& qos); 00068 00073 bool getDeleteSubjectQueue() const; 00074 00078 void setSubjectQueue(bool del); 00079 00084 bool getClearSessions() const; 00085 00086 void addClientProperty(const std::string& key, const std::string& value, const std::string& type="", const std::string& encoding=""); 00087 00088 const ClientPropertyMap& getClientProperties() const; 00089 00093 void setClearSessions(bool del); 00094 00101 std::string toXml(const std::string& extraOffset="") const; 00102 00103 bool getClearClientQueue() const; 00104 00105 void setClearClientQueue(bool clearClientQueue); 00106 }; 00107 00108 }}}} 00109 00110 #endif 00111 00112