activemq-cpp-3.6.0
activemq::util::ActiveMQProperties Class Reference

Implementation of the CMSProperties interface that delegates to a decaf::util::Properties object. More...

#include <src/main/activemq/util/ActiveMQProperties.h>

Inheritance diagram for activemq::util::ActiveMQProperties:

Public Member Functions

 ActiveMQProperties ()
virtual ~ActiveMQProperties ()
virtual decaf::util::PropertiesgetProperties ()
virtual const
decaf::util::Properties
getProperties () const
virtual void setProperties (decaf::util::Properties &props)
virtual int size () const
 Returns the current count of all the Properties that are currently stored in the Properties object.
virtual bool isEmpty () const
 Returns true if the properties object is empty.
virtual const char * getProperty (const std::string &name) const
 Looks up the value for the given property.
virtual std::string getProperty (const std::string &name, const std::string &defaultValue) const
 Looks up the value for the given property.
virtual void setProperty (const std::string &name, const std::string &value)
 Sets the value for a given property.
virtual bool hasProperty (const std::string &name) const
 Check to see if the Property exists in the set.
virtual std::string remove (const std::string &name)
 Removes the property with the given name.
virtual std::vector< std::string > propertyNames () const
 Returns a vector containing all the names of the properties currently stored in the Properties object.
virtual std::vector< std::pair
< std::string, std::string > > 
toArray () const
 Method that serializes the contents of the property map to an array.
virtual void copy (const CMSProperties *source)
virtual CMSProperties * clone () const
 Clones this object.
virtual void clear ()
 Clears all properties from the map.
virtual std::string toString () const
 Formats the contents of the Properties Object into a string that can be logged, etc.
- Public Member Functions inherited from cms::CMSProperties
virtual ~CMSProperties ()
virtual void copy (const CMSProperties *source)=0
 Copies the contents of the given properties object to this one.

Detailed Description

Implementation of the CMSProperties interface that delegates to a decaf::util::Properties object.

Since
2.0

Constructor & Destructor Documentation

activemq::util::ActiveMQProperties::ActiveMQProperties ( )
virtual activemq::util::ActiveMQProperties::~ActiveMQProperties ( )
virtual

Member Function Documentation

virtual void activemq::util::ActiveMQProperties::clear ( )
inlinevirtual

Clears all properties from the map.

Implements cms::CMSProperties.

virtual CMSProperties* activemq::util::ActiveMQProperties::clone ( ) const
virtual

Clones this object.

Returns
a replica of this object.

Implements cms::CMSProperties.

virtual void activemq::util::ActiveMQProperties::copy ( const CMSProperties *  source)
virtual
virtual decaf::util::Properties& activemq::util::ActiveMQProperties::getProperties ( )
inlinevirtual
virtual const decaf::util::Properties& activemq::util::ActiveMQProperties::getProperties ( ) const
inlinevirtual
virtual const char* activemq::util::ActiveMQProperties::getProperty ( const std::string &  name) const
inlinevirtual

Looks up the value for the given property.

Parameters
nameThe name of the property to be looked up.
Returns
the value of the property with the given name, if it exists. If it does not exist, returns NULL.

Implements cms::CMSProperties.

virtual std::string activemq::util::ActiveMQProperties::getProperty ( const std::string &  name,
const std::string &  defaultValue 
) const
inlinevirtual

Looks up the value for the given property.

Parameters
namethe name of the property to be looked up.
defaultValueThe value to be returned if the given property does not exist.
Returns
The value of the property specified by name, if it exists, otherwise the defaultValue.

Implements cms::CMSProperties.

virtual bool activemq::util::ActiveMQProperties::hasProperty ( const std::string &  name) const
inlinevirtual

Check to see if the Property exists in the set.

Parameters
namethe name of the property to check
Returns
true if property exists, false otherwise.

Implements cms::CMSProperties.

virtual bool activemq::util::ActiveMQProperties::isEmpty ( ) const
inlinevirtual

Returns true if the properties object is empty.

Returns
true if empty

Implements cms::CMSProperties.

virtual std::vector<std::string> activemq::util::ActiveMQProperties::propertyNames ( ) const
inlinevirtual

Returns a vector containing all the names of the properties currently stored in the Properties object.

Returns
an STL std::vector<std::string> with all the currently stored property names.

Implements cms::CMSProperties.

virtual std::string activemq::util::ActiveMQProperties::remove ( const std::string &  name)
inlinevirtual

Removes the property with the given name.

If the property existed in the collection then it is removed and returned, otherwise an empty string is returned.

Parameters
namethe name of the property to be removed.
Returns
the value that was removed from the Properties, or empty string.

Implements cms::CMSProperties.

virtual void activemq::util::ActiveMQProperties::setProperties ( decaf::util::Properties props)
inlinevirtual
virtual void activemq::util::ActiveMQProperties::setProperty ( const std::string &  name,
const std::string &  value 
)
inlinevirtual

Sets the value for a given property.

If the property already exists, overwrites the value.

Parameters
nameThe name of the value to be written.
valueThe value to be written.

Implements cms::CMSProperties.

virtual int activemq::util::ActiveMQProperties::size ( ) const
inlinevirtual

Returns the current count of all the Properties that are currently stored in the Properties object.

Returns
the number of properties currently stored.

Implements cms::CMSProperties.

virtual std::vector<std::pair<std::string, std::string> > activemq::util::ActiveMQProperties::toArray ( ) const
inlinevirtual

Method that serializes the contents of the property map to an array.

Returns
list of pairs where the first is the name and the second is the value.

Implements cms::CMSProperties.

virtual std::string activemq::util::ActiveMQProperties::toString ( ) const
inlinevirtual

Formats the contents of the Properties Object into a string that can be logged, etc.

Returns
string value of this object.

Implements cms::CMSProperties.


The documentation for this class was generated from the following file: