00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _ACTIVEMQ_UTIL_ACTIVEMQPROPERTIES_H_
00019 #define _ACTIVEMQ_UTIL_ACTIVEMQPROPERTIES_H_
00020
00021 #include <map>
00022 #include <string>
00023 #include <sstream>
00024 #include <activemq/util/Config.h>
00025 #include <cms/CMSProperties.h>
00026 #include <decaf/util/Properties.h>
00027
00028 namespace activemq {
00029 namespace util {
00030
00037 class AMQCPP_API ActiveMQProperties: public cms::CMSProperties {
00038 private:
00039
00040 decaf::util::Properties properties;
00041
00042 public:
00043
00044 ActiveMQProperties();
00045
00046 virtual ~ActiveMQProperties();
00047
00048 virtual decaf::util::Properties& getProperties() {
00049 return this->properties;
00050 }
00051
00052 virtual const decaf::util::Properties& getProperties() const {
00053 return this->properties;
00054 }
00055
00056 virtual void setProperties(decaf::util::Properties& props) {
00057 this->properties = props;
00058 }
00059
00060 virtual int size() const {
00061 return properties.size();
00062 }
00063
00064 virtual bool isEmpty() const {
00065 return properties.isEmpty();
00066 }
00067
00068 virtual const char* getProperty(const std::string& name) const {
00069 return properties.getProperty(name);
00070 }
00071
00072 virtual std::string getProperty(const std::string& name, const std::string& defaultValue) const {
00073 return properties.getProperty(name, defaultValue);
00074 }
00075
00076 virtual void setProperty(const std::string& name, const std::string& value) {
00077 properties.setProperty(name, value);
00078 }
00079
00080 virtual bool hasProperty(const std::string& name) const {
00081 return properties.hasProperty(name);
00082 }
00083
00084 virtual std::string remove(const std::string& name) {
00085 return properties.remove(name);
00086 }
00087
00088 virtual std::vector<std::string> propertyNames() const {
00089 return properties.propertyNames();
00090 }
00091
00092 virtual std::vector<std::pair<std::string, std::string> > toArray() const {
00093 return properties.toArray();
00094 }
00095
00096 virtual void copy(const CMSProperties* source);
00097
00098 virtual CMSProperties* clone() const;
00099
00100 virtual void clear() {
00101 properties.clear();
00102 }
00103
00104 virtual std::string toString() const {
00105 return properties.toString();
00106 }
00107
00108 };
00109
00110 }}
00111
00112 #endif