activemq::commands::ActiveMQMapMessage Class Reference

#include <src/main/activemq/commands/ActiveMQMapMessage.h>

Inheritance diagram for activemq::commands::ActiveMQMapMessage:
Inheritance graph
[legend]

Public Member Functions

 ActiveMQMapMessage ()
virtual ~ActiveMQMapMessage () throw ()
virtual unsigned char getDataStructureType () const
 Get the DataStructure Type as defined in CommandTypes.h.
virtual bool isMarshalAware () const
 Indicates that this command is aware of Marshaling, and needs to have its Marshaling methods invoked.
virtual ActiveMQMapMessagecloneDataStructure () const
 Clone this obbject and return a new instance that the caller now owns, this will be an exact copy of this one.
virtual void copyDataStructure (const DataStructure *src)
virtual void beforeMarshal (wireformat::WireFormat *wireFormat)
 Called before marshaling is started to prepare the object to be marshaled.
virtual std::string toString () const
 Returns a string containing the information for this DataStructure such as its type and value of its elements.
virtual bool equals (const DataStructure *value) const
 Compares the DataStructure passed in to this one, and returns if they are equivalent.
virtual void clearBody () throw ( cms::CMSException )
 Clears out the body of the message.
virtual cms::MapMessageclone () const
 Clone this message exactly, returns a new instance that the caller is required to delete.
virtual bool isEmpty () const
 Returns true if there are no values stored in the MapMessage body.
Returns:
true if the body of the MapMessage contains no elements.
Exceptions:
CMSException if the operation fails due to an internal error.

virtual std::vector< std::string > getMapNames () const
 Returns an Enumeration of all the names in the MapMessage object.
Returns:
STL Vector of String values, each of which is the name of an item in the MapMessage
Exceptions:
CMSException - if the operation fails due to an internal error.

virtual bool itemExists (const std::string &name) const
 Indicates whether an item exists in this MapMessage object.
Parameters:
name String name of the Object in question
Returns:
boolean value indicating if the name is in the map
Exceptions:
CMSException - if the operation fails due to an internal error.

virtual cms::Message::ValueType getValueType (const std::string &key) const
 Returns the value type for the given key mapping.The CMS provider should translate all internal type identifiers into the CMS Value types returning UNKNOWN_TYPE for any specialized types not directly supported in the CMS API.
Parameters:
key The string key used to look up the value type mapping.
Returns:
The ValueType contained in the given mapping.
Exceptions:
CMSException if no mapping exists that matches the requested key.

virtual bool getBoolean (const std::string &name) const
 Returns the Boolean value of the Specified name.
Parameters:
name Name of the value to fetch from the map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageFormatException - if this type conversion is invalid.

virtual void setBoolean (const std::string &name, bool value)
 Sets a boolean value with the specified name into the Map.
Parameters:
name the name of the boolean
value the boolean value to set in the Map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageNotWritableException - if the Message is in Read-only Mode.

virtual unsigned char getByte (const std::string &name) const
 Returns the Byte value of the Specified name.
Parameters:
name Name of the value to fetch from the map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageFormatException - if this type conversion is invalid.

virtual void setByte (const std::string &name, unsigned char value)
 Sets a Byte value with the specified name into the Map.
Parameters:
name the name of the Byte
value the Byte value to set in the Map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageNotWriteableException - if the Message is in Read-only Mode.

virtual std::vector< unsigned
char > 
getBytes (const std::string &name) const
 Returns the Bytes value of the Specified name.
Parameters:
name Name of the value to fetch from the map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageFormatException - if this type conversion is invalid.

virtual void setBytes (const std::string &name, const std::vector< unsigned char > &value)
 Sets a Bytes value with the specified name into the Map.
Parameters:
name The name of the Bytes
value The Bytes value to set in the Map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageNotWriteableException - if the Message is in Read-only Mode.

virtual char getChar (const std::string &name) const
 Returns the Char value of the Specified name.
Parameters:
name name of the value to fetch from the map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageFormatException - if this type conversion is invalid.

virtual void setChar (const std::string &name, char value)
 Sets a Char value with the specified name into the Map.
Parameters:
name the name of the Char
value the Char value to set in the Map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageNotWriteableException - if the Message is in Read-only Mode.

virtual double getDouble (const std::string &name) const
 Returns the Double value of the Specified name.
Parameters:
name Name of the value to fetch from the map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageFormatException - if this type conversion is invalid.

virtual void setDouble (const std::string &name, double value)
 Sets a Double value with the specified name into the Map.
Parameters:
name The name of the Double
value The Double value to set in the Map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageNotWriteableException - if the Message is in Read-only Mode.

virtual float getFloat (const std::string &name) const
 Returns the Float value of the Specified name.
Parameters:
name Name of the value to fetch from the map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageFormatException - if this type conversion is invalid.

virtual void setFloat (const std::string &name, float value)
 Sets a Float value with the specified name into the Map.
Parameters:
name The name of the Float
value The Float value to set in the Map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageNotWriteableException - if the Message is in Read-only Mode.

virtual int getInt (const std::string &name) const
 Returns the Int value of the Specified name.
Parameters:
name Name of the value to fetch from the map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageFormatException - if this type conversion is invalid.

virtual void setInt (const std::string &name, int value)
 Sets a Int value with the specified name into the Map.
Parameters:
name The name of the Int
value The Int value to set in the Map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageNotWriteableException - if the Message is in Read-only Mode.

virtual long long getLong (const std::string &name) const
 Returns the Long value of the Specified name.
Parameters:
name Name of the value to fetch from the map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageFormatException - if this type conversion is invalid.

virtual void setLong (const std::string &name, long long value)
 Sets a Long value with the specified name into the Map.
Parameters:
name The name of the Long
value The Long value to set in the Map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageNotWriteableException - if the Message is in Read-only Mode.

virtual short getShort (const std::string &name) const
 Returns the Short value of the Specified name.
Parameters:
name Name of the value to fetch from the map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageFormatException - if this type conversion is invalid.

virtual void setShort (const std::string &name, short value)
 Sets a Short value with the specified name into the Map.
Parameters:
name The name of the Short
value The Short value to set in the Map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageNotWriteableException - if the Message is in Read-only Mode.

virtual std::string getString (const std::string &name) const
 Returns the String value of the Specified name.
Parameters:
name Name of the value to fetch from the map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageFormatException - if this type conversion is invalid.

virtual void setString (const std::string &name, const std::string &value)
 Sets a String value with the specified name into the Map.
Parameters:
name The name of the String
value The String value to set in the Map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageNotWriteableException - if the Message is in Read-only Mode.

Static Public Attributes

static const unsigned char ID_ACTIVEMQMAPMESSAGE = 25

Protected Member Functions

util::PrimitiveMapgetMap ()
 Fetches a reference to this objects PrimitiveMap, if one needs to be created or unmarshaled, this will perform the correct steps.
const util::PrimitiveMapgetMap () const
virtual void checkMapIsUnmarshalled () const
 Performs the unmarshal on the Map if needed, otherwise just returns.

Constructor & Destructor Documentation

activemq::commands::ActiveMQMapMessage::ActiveMQMapMessage (  ) 
virtual activemq::commands::ActiveMQMapMessage::~ActiveMQMapMessage (  )  throw () [virtual]

Member Function Documentation

virtual void activemq::commands::ActiveMQMapMessage::beforeMarshal ( wireformat::WireFormat wireFormat  )  [virtual]

Called before marshaling is started to prepare the object to be marshaled.

Parameters:
wireFormat The wireformat object to control marshaling
Exceptions:
IOException if an I/O error occurs.

Implements activemq::wireformat::MarshalAware.

virtual void activemq::commands::ActiveMQMapMessage::checkMapIsUnmarshalled (  )  const [protected, virtual]

Performs the unmarshal on the Map if needed, otherwise just returns.

Exceptions:
NullPointerException if the internal Map is Null.
virtual void activemq::commands::ActiveMQMapMessage::clearBody (  )  throw ( cms::CMSException ) [virtual]

Clears out the body of the message.

This does not clear the headers or properties.

Exceptions:
CMSException - if an internal error occurs.

Reimplemented from activemq::commands::ActiveMQMessageTemplate< cms::MapMessage >.

virtual cms::MapMessage* activemq::commands::ActiveMQMapMessage::clone (  )  const [inline, virtual]

Clone this message exactly, returns a new instance that the caller is required to delete.

Returns:
new copy of this message

Implements cms::Message.

References activemq::commands::Message::setReadOnlyBody(), and activemq::commands::Message::setReadOnlyProperties().

virtual ActiveMQMapMessage* activemq::commands::ActiveMQMapMessage::cloneDataStructure (  )  const [virtual]

Clone this obbject and return a new instance that the caller now owns, this will be an exact copy of this one.

Returns:
new copy of this object.

Reimplemented from activemq::commands::Message.

virtual void activemq::commands::ActiveMQMapMessage::copyDataStructure ( const DataStructure src  )  [virtual]

Reimplemented from activemq::commands::Message.

virtual bool activemq::commands::ActiveMQMapMessage::equals ( const DataStructure value  )  const [virtual]

Compares the DataStructure passed in to this one, and returns if they are equivalent.

Equivalent here means that they are of the same type, and that each element of the objects are the same.

Returns:
true if DataStructure's are Equal.

Reimplemented from activemq::commands::ActiveMQMessageTemplate< cms::MapMessage >.

virtual bool activemq::commands::ActiveMQMapMessage::getBoolean ( const std::string &  name  )  const [virtual]

Returns the Boolean value of the Specified name.

Parameters:
name Name of the value to fetch from the map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageFormatException - if this type conversion is invalid.

Implements cms::MapMessage.

virtual unsigned char activemq::commands::ActiveMQMapMessage::getByte ( const std::string &  name  )  const [virtual]

Returns the Byte value of the Specified name.

Parameters:
name Name of the value to fetch from the map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageFormatException - if this type conversion is invalid.

Implements cms::MapMessage.

virtual std::vector<unsigned char> activemq::commands::ActiveMQMapMessage::getBytes ( const std::string &  name  )  const [virtual]

Returns the Bytes value of the Specified name.

Parameters:
name Name of the value to fetch from the map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageFormatException - if this type conversion is invalid.

Implements cms::MapMessage.

virtual char activemq::commands::ActiveMQMapMessage::getChar ( const std::string &  name  )  const [virtual]

Returns the Char value of the Specified name.

Parameters:
name name of the value to fetch from the map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageFormatException - if this type conversion is invalid.

Implements cms::MapMessage.

virtual unsigned char activemq::commands::ActiveMQMapMessage::getDataStructureType (  )  const [virtual]

Get the DataStructure Type as defined in CommandTypes.h.

Returns:
The type of the data structure

Reimplemented from activemq::commands::Message.

virtual double activemq::commands::ActiveMQMapMessage::getDouble ( const std::string &  name  )  const [virtual]

Returns the Double value of the Specified name.

Parameters:
name Name of the value to fetch from the map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageFormatException - if this type conversion is invalid.

Implements cms::MapMessage.

virtual float activemq::commands::ActiveMQMapMessage::getFloat ( const std::string &  name  )  const [virtual]

Returns the Float value of the Specified name.

Parameters:
name Name of the value to fetch from the map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageFormatException - if this type conversion is invalid.

Implements cms::MapMessage.

virtual int activemq::commands::ActiveMQMapMessage::getInt ( const std::string &  name  )  const [virtual]

Returns the Int value of the Specified name.

Parameters:
name Name of the value to fetch from the map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageFormatException - if this type conversion is invalid.

Implements cms::MapMessage.

virtual long long activemq::commands::ActiveMQMapMessage::getLong ( const std::string &  name  )  const [virtual]

Returns the Long value of the Specified name.

Parameters:
name Name of the value to fetch from the map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageFormatException - if this type conversion is invalid.

Implements cms::MapMessage.

const util::PrimitiveMap& activemq::commands::ActiveMQMapMessage::getMap (  )  const [protected]
util::PrimitiveMap& activemq::commands::ActiveMQMapMessage::getMap (  )  [protected]

Fetches a reference to this objects PrimitiveMap, if one needs to be created or unmarshaled, this will perform the correct steps.

Returns:
reference to a PrimtiveMap;
Exceptions:
NullPointerException if the internal Map is Null.
virtual std::vector< std::string > activemq::commands::ActiveMQMapMessage::getMapNames (  )  const [virtual]

Returns an Enumeration of all the names in the MapMessage object.

Returns:
STL Vector of String values, each of which is the name of an item in the MapMessage
Exceptions:
CMSException - if the operation fails due to an internal error.

Implements cms::MapMessage.

virtual short activemq::commands::ActiveMQMapMessage::getShort ( const std::string &  name  )  const [virtual]

Returns the Short value of the Specified name.

Parameters:
name Name of the value to fetch from the map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageFormatException - if this type conversion is invalid.

Implements cms::MapMessage.

virtual std::string activemq::commands::ActiveMQMapMessage::getString ( const std::string &  name  )  const [virtual]

Returns the String value of the Specified name.

Parameters:
name Name of the value to fetch from the map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageFormatException - if this type conversion is invalid.

Implements cms::MapMessage.

virtual cms::Message::ValueType activemq::commands::ActiveMQMapMessage::getValueType ( const std::string &  key  )  const [virtual]

Returns the value type for the given key mapping.The CMS provider should translate all internal type identifiers into the CMS Value types returning UNKNOWN_TYPE for any specialized types not directly supported in the CMS API.

Parameters:
key The string key used to look up the value type mapping.
Returns:
The ValueType contained in the given mapping.
Exceptions:
CMSException if no mapping exists that matches the requested key.

Implements cms::MapMessage.

virtual bool activemq::commands::ActiveMQMapMessage::isEmpty (  )  const [virtual]

Returns true if there are no values stored in the MapMessage body.

Returns:
true if the body of the MapMessage contains no elements.
Exceptions:
CMSException if the operation fails due to an internal error.

Implements cms::MapMessage.

virtual bool activemq::commands::ActiveMQMapMessage::isMarshalAware (  )  const [inline, virtual]

Indicates that this command is aware of Marshaling, and needs to have its Marshaling methods invoked.

Returns:
boolean indicating desire to be in marshaling stages

Reimplemented from activemq::commands::Message.

virtual bool activemq::commands::ActiveMQMapMessage::itemExists ( const std::string &  name  )  const [virtual]

Indicates whether an item exists in this MapMessage object.

Parameters:
name String name of the Object in question
Returns:
boolean value indicating if the name is in the map
Exceptions:
CMSException - if the operation fails due to an internal error.

Implements cms::MapMessage.

virtual void activemq::commands::ActiveMQMapMessage::setBoolean ( const std::string &  name,
bool  value 
) [virtual]

Sets a boolean value with the specified name into the Map.

Parameters:
name the name of the boolean
value the boolean value to set in the Map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageNotWritableException - if the Message is in Read-only Mode.

Implements cms::MapMessage.

virtual void activemq::commands::ActiveMQMapMessage::setByte ( const std::string &  name,
unsigned char  value 
) [virtual]

Sets a Byte value with the specified name into the Map.

Parameters:
name the name of the Byte
value the Byte value to set in the Map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageNotWriteableException - if the Message is in Read-only Mode.

Implements cms::MapMessage.

virtual void activemq::commands::ActiveMQMapMessage::setBytes ( const std::string &  name,
const std::vector< unsigned char > &  value 
) [virtual]

Sets a Bytes value with the specified name into the Map.

Parameters:
name The name of the Bytes
value The Bytes value to set in the Map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageNotWriteableException - if the Message is in Read-only Mode.

Implements cms::MapMessage.

virtual void activemq::commands::ActiveMQMapMessage::setChar ( const std::string &  name,
char  value 
) [virtual]

Sets a Char value with the specified name into the Map.

Parameters:
name the name of the Char
value the Char value to set in the Map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageNotWriteableException - if the Message is in Read-only Mode.

Implements cms::MapMessage.

virtual void activemq::commands::ActiveMQMapMessage::setDouble ( const std::string &  name,
double  value 
) [virtual]

Sets a Double value with the specified name into the Map.

Parameters:
name The name of the Double
value The Double value to set in the Map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageNotWriteableException - if the Message is in Read-only Mode.

Implements cms::MapMessage.

virtual void activemq::commands::ActiveMQMapMessage::setFloat ( const std::string &  name,
float  value 
) [virtual]

Sets a Float value with the specified name into the Map.

Parameters:
name The name of the Float
value The Float value to set in the Map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageNotWriteableException - if the Message is in Read-only Mode.

Implements cms::MapMessage.

virtual void activemq::commands::ActiveMQMapMessage::setInt ( const std::string &  name,
int  value 
) [virtual]

Sets a Int value with the specified name into the Map.

Parameters:
name The name of the Int
value The Int value to set in the Map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageNotWriteableException - if the Message is in Read-only Mode.

Implements cms::MapMessage.

virtual void activemq::commands::ActiveMQMapMessage::setLong ( const std::string &  name,
long long  value 
) [virtual]

Sets a Long value with the specified name into the Map.

Parameters:
name The name of the Long
value The Long value to set in the Map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageNotWriteableException - if the Message is in Read-only Mode.

Implements cms::MapMessage.

virtual void activemq::commands::ActiveMQMapMessage::setShort ( const std::string &  name,
short  value 
) [virtual]

Sets a Short value with the specified name into the Map.

Parameters:
name The name of the Short
value The Short value to set in the Map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageNotWriteableException - if the Message is in Read-only Mode.

Implements cms::MapMessage.

virtual void activemq::commands::ActiveMQMapMessage::setString ( const std::string &  name,
const std::string &  value 
) [virtual]

Sets a String value with the specified name into the Map.

Parameters:
name The name of the String
value The String value to set in the Map
Exceptions:
CMSException - if the operation fails due to an internal error.
MessageNotWriteableException - if the Message is in Read-only Mode.

Implements cms::MapMessage.

virtual std::string activemq::commands::ActiveMQMapMessage::toString (  )  const [virtual]

Returns a string containing the information for this DataStructure such as its type and value of its elements.

Returns:
formatted string useful for debugging.

Reimplemented from activemq::commands::Message.


Field Documentation


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

Generated on 1 Dec 2014 for activemq-cpp-3.8.2 by  doxygen 1.6.1