activemq-cpp-3.6.0
activemq::commands::ActiveMQMapMessage Class Reference

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

Inheritance diagram for activemq::commands::ActiveMQMapMessage:

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)
 Copy the contents of the passed object into this objects members, overwriting any existing data.
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
CMSExceptionif 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
nameString 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
keyThe string key used to look up the value type mapping.
Returns
The ValueType contained in the given mapping.
Exceptions
CMSExceptionif 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
nameName 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
namethe name of the boolean
valuethe 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
nameName 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
namethe name of the Byte
valuethe 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
nameName 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
nameThe name of the Bytes
valueThe 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
namename 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
namethe name of the Char
valuethe 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
nameName 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
nameThe name of the Double
valueThe 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
nameName 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
nameThe name of the Float
valueThe 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
nameName 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
nameThe name of the Int
valueThe 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
nameName 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
nameThe name of the Long
valueThe 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
nameName 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
nameThe name of the Short
valueThe 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
nameName 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
nameThe name of the String
valueThe 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.

- Public Member Functions inherited from activemq::commands::ActiveMQMessageTemplate< cms::MapMessage >
 ActiveMQMessageTemplate ()
virtual ~ActiveMQMessageTemplate () throw ()
virtual void acknowledge () const
 Acknowledges all consumed messages of the session of this consumed message.
virtual void onSend ()
 Allows derived Message classes to perform tasks before a message is sent.
virtual void clearProperties ()
 Clears out the message body.
virtual std::vector< std::string > getPropertyNames () const
 Retrieves the property names.
virtual bool propertyExists (const std::string &name) const
 Indicates whether or not a given property exists.
virtual cms::Message::ValueType getPropertyValueType (const std::string &name) const
 Returns the value type for the given property key.
virtual bool getBooleanProperty (const std::string &name) const
 Gets a boolean property.
virtual unsigned char getByteProperty (const std::string &name) const
 Gets a byte property.
virtual double getDoubleProperty (const std::string &name) const
 Gets a double property.
virtual float getFloatProperty (const std::string &name) const
 Gets a float property.
virtual int getIntProperty (const std::string &name) const
 Gets a int property.
virtual long long getLongProperty (const std::string &name) const
 Gets a long property.
virtual short getShortProperty (const std::string &name) const
 Gets a short property.
virtual std::string getStringProperty (const std::string &name) const
 Gets a string property.
virtual void setBooleanProperty (const std::string &name, bool value)
 Sets a boolean property.
virtual void setByteProperty (const std::string &name, unsigned char value)
 Sets a byte property.
virtual void setDoubleProperty (const std::string &name, double value)
 Sets a double property.
virtual void setFloatProperty (const std::string &name, float value)
 Sets a float property.
virtual void setIntProperty (const std::string &name, int value)
 Sets a int property.
virtual void setLongProperty (const std::string &name, long long value)
 Sets a long property.
virtual void setShortProperty (const std::string &name, short value)
 Sets a short property.
virtual void setStringProperty (const std::string &name, const std::string &value)
 Sets a string property.
virtual std::string getCMSCorrelationID () const
 Gets the correlation ID for the message.
virtual void setCMSCorrelationID (const std::string &correlationId)
 Sets the correlation ID for the message.
virtual int getCMSDeliveryMode () const
 Gets the DeliveryMode for this message.
virtual void setCMSDeliveryMode (int mode)
 Sets the DeliveryMode for this message.
virtual const cms::DestinationgetCMSDestination () const
 Gets the Destination object for this message.
virtual void setCMSDestination (const cms::Destination *destination)
 Sets the Destination object for this message.
virtual long long getCMSExpiration () const
 Gets the message's expiration value.
virtual void setCMSExpiration (long long expireTime)
 Sets the message's expiration value.
virtual std::string getCMSMessageID () const
 The CMSMessageID header field contains a value that uniquely identifies each message sent by a provider.
virtual void setCMSMessageID (const std::string &id AMQCPP_UNUSED)
virtual int getCMSPriority () const
 Gets the message priority level.
virtual void setCMSPriority (int priority)
 Sets the Priority Value for this message.
virtual bool getCMSRedelivered () const
 Gets an indication of whether this message is being redelivered.
virtual void setCMSRedelivered (bool redelivered AMQCPP_UNUSED)
 Specifies whether this message is being redelivered.
virtual const cms::DestinationgetCMSReplyTo () const
 Gets the Destination object to which a reply to this message should be sent.
virtual void setCMSReplyTo (const cms::Destination *destination)
 Sets the Destination object to which a reply to this message should be sent.
virtual long long getCMSTimestamp () const
 Gets the message timestamp.
virtual void setCMSTimestamp (long long timeStamp)
 Sets the message timestamp.
virtual std::string getCMSType () const
 Gets the message type identifier supplied by the client when the message was sent.
virtual void setCMSType (const std::string &type)
 Sets the message type.
- Public Member Functions inherited from cms::MapMessage
virtual ~MapMessage ()
- Public Member Functions inherited from cms::Message
virtual ~Message ()
virtual void setCMSMessageID (const std::string &id)=0
 Sets the message ID.
- Public Member Functions inherited from activemq::commands::Message
 Message ()
virtual ~Message ()
Pointer< Messagecopy () const
 Create a Pointer based copy of this message.
virtual void beforeMarshal (wireformat::WireFormat *wireFormat AMQCPP_UNUSED)
 Handles the marshaling of the objects properties into the internal byte array before the object is marshaled to the wire.
virtual void afterUnmarshal (wireformat::WireFormat *wireFormat AMQCPP_UNUSED)
 Called after unmarshaling is started to cleanup the object being unmarshaled.
virtual void setAckHandler (const Pointer< core::ActiveMQAckHandler > &handler)
 Sets the Acknowledgment Handler that this Message will use when the Acknowledge method is called.
virtual Pointer
< core::ActiveMQAckHandler
getAckHandler () const
 Gets the Acknowledgment Handler that this Message will use when the Acknowledge method is called.
void setConnection (core::ActiveMQConnection *connection)
 Sets the ActiveMQConnection instance that this Command was created from when the session create methods are called to create a Message.
core::ActiveMQConnectiongetConnection () const
 Gets the ActiveMQConnection instance that this Command was created from when the session create methods are called to create a Message.
virtual unsigned int getSize () const
 Returns the Size of this message in Bytes.
virtual bool isExpired () const
 Returns if this message has expired, meaning that its Expiration time has elapsed.
util::PrimitiveMapgetMessageProperties ()
 Gets a reference to the Message's Properties object, allows the derived classes to get and set their own specific properties.
const util::PrimitiveMapgetMessageProperties () const
bool isReadOnlyProperties () const
 Returns if the Message Properties Are Read Only.
void setReadOnlyProperties (bool value)
 Set the Read Only State of the Message Properties.
bool isReadOnlyBody () const
 Returns if the Message Body is Read Only.
void setReadOnlyBody (bool value)
 Set the Read Only State of the Message Content.
virtual const Pointer
< ProducerId > & 
getProducerId () const
virtual Pointer< ProducerId > & getProducerId ()
virtual void setProducerId (const Pointer< ProducerId > &producerId)
virtual const Pointer
< ActiveMQDestination > & 
getDestination () const
virtual Pointer
< ActiveMQDestination > & 
getDestination ()
virtual void setDestination (const Pointer< ActiveMQDestination > &destination)
virtual const Pointer
< TransactionId > & 
getTransactionId () const
virtual Pointer< TransactionId > & getTransactionId ()
virtual void setTransactionId (const Pointer< TransactionId > &transactionId)
virtual const Pointer
< ActiveMQDestination > & 
getOriginalDestination () const
virtual Pointer
< ActiveMQDestination > & 
getOriginalDestination ()
virtual void setOriginalDestination (const Pointer< ActiveMQDestination > &originalDestination)
virtual const Pointer
< MessageId > & 
getMessageId () const
virtual Pointer< MessageId > & getMessageId ()
virtual void setMessageId (const Pointer< MessageId > &messageId)
virtual const Pointer
< TransactionId > & 
getOriginalTransactionId () const
virtual Pointer< TransactionId > & getOriginalTransactionId ()
virtual void setOriginalTransactionId (const Pointer< TransactionId > &originalTransactionId)
virtual const std::string & getGroupID () const
virtual std::string & getGroupID ()
virtual void setGroupID (const std::string &groupID)
virtual int getGroupSequence () const
virtual void setGroupSequence (int groupSequence)
virtual const std::string & getCorrelationId () const
virtual std::string & getCorrelationId ()
virtual void setCorrelationId (const std::string &correlationId)
virtual bool isPersistent () const
virtual void setPersistent (bool persistent)
virtual long long getExpiration () const
virtual void setExpiration (long long expiration)
virtual unsigned char getPriority () const
virtual void setPriority (unsigned char priority)
virtual const Pointer
< ActiveMQDestination > & 
getReplyTo () const
virtual Pointer
< ActiveMQDestination > & 
getReplyTo ()
virtual void setReplyTo (const Pointer< ActiveMQDestination > &replyTo)
virtual long long getTimestamp () const
virtual void setTimestamp (long long timestamp)
virtual const std::string & getType () const
virtual std::string & getType ()
virtual void setType (const std::string &type)
virtual const std::vector
< unsigned char > & 
getContent () const
virtual std::vector< unsigned
char > & 
getContent ()
virtual void setContent (const std::vector< unsigned char > &content)
virtual const std::vector
< unsigned char > & 
getMarshalledProperties () const
virtual std::vector< unsigned
char > & 
getMarshalledProperties ()
virtual void setMarshalledProperties (const std::vector< unsigned char > &marshalledProperties)
virtual const Pointer
< DataStructure > & 
getDataStructure () const
virtual Pointer< DataStructure > & getDataStructure ()
virtual void setDataStructure (const Pointer< DataStructure > &dataStructure)
virtual const Pointer
< ConsumerId > & 
getTargetConsumerId () const
virtual Pointer< ConsumerId > & getTargetConsumerId ()
virtual void setTargetConsumerId (const Pointer< ConsumerId > &targetConsumerId)
virtual bool isCompressed () const
virtual void setCompressed (bool compressed)
virtual int getRedeliveryCounter () const
virtual void setRedeliveryCounter (int redeliveryCounter)
virtual const std::vector
< decaf::lang::Pointer
< BrokerId > > & 
getBrokerPath () const
virtual std::vector
< decaf::lang::Pointer
< BrokerId > > & 
getBrokerPath ()
virtual void setBrokerPath (const std::vector< decaf::lang::Pointer< BrokerId > > &brokerPath)
virtual long long getArrival () const
virtual void setArrival (long long arrival)
virtual const std::string & getUserID () const
virtual std::string & getUserID ()
virtual void setUserID (const std::string &userID)
virtual bool isRecievedByDFBridge () const
virtual void setRecievedByDFBridge (bool recievedByDFBridge)
virtual bool isDroppable () const
virtual void setDroppable (bool droppable)
virtual const std::vector
< decaf::lang::Pointer
< BrokerId > > & 
getCluster () const
virtual std::vector
< decaf::lang::Pointer
< BrokerId > > & 
getCluster ()
virtual void setCluster (const std::vector< decaf::lang::Pointer< BrokerId > > &cluster)
virtual long long getBrokerInTime () const
virtual void setBrokerInTime (long long brokerInTime)
virtual long long getBrokerOutTime () const
virtual void setBrokerOutTime (long long brokerOutTime)
virtual bool isMessage () const
virtual Pointer< Commandvisit (activemq::state::CommandVisitor *visitor)
 Allows a Visitor to visit this command and return a response to the command based on the command type being visited.
- Public Member Functions inherited from activemq::commands::BaseCommand
 BaseCommand ()
virtual ~BaseCommand ()
virtual void setCommandId (int id)
 Sets the Command Id of this Message.
virtual int getCommandId () const
 Gets the Command Id of this Message.
virtual void setResponseRequired (const bool required)
 Set if this Message requires a Response.
virtual bool isResponseRequired () const
 Is a Response required for this Command.
virtual bool isBrokerInfo () const
virtual bool isControlCommand () const
virtual bool isConnectionControl () const
virtual bool isConnectionError () const
virtual bool isConnectionInfo () const
virtual bool isConsumerInfo () const
virtual bool isConsumerControl () const
virtual bool isDestinationInfo () const
virtual bool isFlushCommand () const
virtual bool isMessageAck () const
virtual bool isMessagePull () const
virtual bool isKeepAliveInfo () const
virtual bool isMessageDispatch () const
virtual bool isMessageDispatchNotification () const
virtual bool isProducerAck () const
virtual bool isProducerInfo () const
virtual bool isResponse () const
virtual bool isRemoveInfo () const
virtual bool isRemoveSubscriptionInfo () const
virtual bool isReplayCommand () const
virtual bool isSessionInfo () const
virtual bool isShutdownInfo () const
virtual bool isTransactionInfo () const
virtual bool isWireFormatInfo () const
- Public Member Functions inherited from activemq::commands::Command
virtual ~Command ()
- Public Member Functions inherited from activemq::commands::BaseDataStructure
virtual ~BaseDataStructure ()
virtual void afterMarshal (wireformat::WireFormat *wireFormat AMQCPP_UNUSED)
virtual void beforeUnmarshal (wireformat::WireFormat *wireFormat AMQCPP_UNUSED)
virtual void setMarshaledForm (wireformat::WireFormat *wireFormat AMQCPP_UNUSED, const std::vector< char > &data AMQCPP_UNUSED)
virtual std::vector< unsigned
char > 
getMarshaledForm (wireformat::WireFormat *wireFormat AMQCPP_UNUSED)
virtual void copyDataStructure (const DataStructure *src AMQCPP_UNUSED)
virtual bool equals (const DataStructure *value AMQCPP_UNUSED) const
- Public Member Functions inherited from activemq::commands::DataStructure
virtual ~DataStructure ()
- Public Member Functions inherited from activemq::wireformat::MarshalAware
virtual ~MarshalAware ()
virtual void afterMarshal (WireFormat *wireFormat)=0
 Called after marshaling is started to cleanup the object being marshaled.
virtual void beforeUnmarshal (WireFormat *wireFormat)=0
 Called before unmarshaling is started to prepare the object to be unmarshaled.
virtual void afterUnmarshal (WireFormat *wireFormat)=0
 Called after unmarshaling is started to cleanup the object being unmarshaled.
virtual void setMarshaledForm (WireFormat *wireFormat, const std::vector< char > &data)=0
 Called to set the data to this object that will contain the objects marshaled form.
virtual std::vector< unsigned
char > 
getMarshaledForm (WireFormat *wireFormat)=0
 Called to get the data to this object that will contain the objects marshaled form.

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.
- Protected Member Functions inherited from activemq::commands::ActiveMQMessageTemplate< cms::MapMessage >
void failIfWriteOnlyBody () const
void failIfReadOnlyBody () const
void failIfReadOnlyProperties () const

Additional Inherited Members

- Public Types inherited from cms::Message
enum  ValueType {
  NULL_TYPE = 0, BOOLEAN_TYPE = 1, BYTE_TYPE = 2, CHAR_TYPE = 3,
  SHORT_TYPE = 4, INTEGER_TYPE = 5, LONG_TYPE = 6, DOUBLE_TYPE = 7,
  FLOAT_TYPE = 8, STRING_TYPE = 9, BYTE_ARRAY_TYPE = 10, UNKNOWN_TYPE = 11
}
 Defines the Type Identifiers used to identify the type contained within a specific Message property or MapMessage keyed value. More...
- Protected Attributes inherited from activemq::commands::Message
Pointer< ProducerIdproducerId
Pointer< ActiveMQDestinationdestination
Pointer< TransactionIdtransactionId
Pointer< ActiveMQDestinationoriginalDestination
Pointer< MessageIdmessageId
Pointer< TransactionIdoriginalTransactionId
std::string groupID
int groupSequence
std::string correlationId
bool persistent
long long expiration
unsigned char priority
Pointer< ActiveMQDestinationreplyTo
long long timestamp
std::string type
std::vector< unsigned char > content
std::vector< unsigned char > marshalledProperties
Pointer< DataStructuredataStructure
Pointer< ConsumerIdtargetConsumerId
bool compressed
int redeliveryCounter
std::vector
< decaf::lang::Pointer
< BrokerId > > 
brokerPath
long long arrival
std::string userID
bool recievedByDFBridge
bool droppable
std::vector
< decaf::lang::Pointer
< BrokerId > > 
cluster
long long brokerInTime
long long brokerOutTime
core::ActiveMQConnectionconnection
- Static Protected Attributes inherited from activemq::commands::Message
static const unsigned int DEFAULT_MESSAGE_SIZE = 1024

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
wireFormatThe wireformat object to control marshaling
Exceptions
IOExceptionif an I/O error occurs.

Implements activemq::wireformat::MarshalAware.

virtual void activemq::commands::ActiveMQMapMessage::checkMapIsUnmarshalled ( ) const
protectedvirtual

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

Exceptions
NullPointerExceptionif 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
inlinevirtual

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

Copy the contents of the passed object into this objects members, overwriting any existing data.

Returns
src - Source Object

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
nameName 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
nameName 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
nameName 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
namename 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
nameName 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
nameName 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
nameName 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
nameName 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.

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
NullPointerExceptionif the internal Map is Null.
const util::PrimitiveMap& activemq::commands::ActiveMQMapMessage::getMap ( ) const
protected
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
nameName 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
nameName 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
keyThe string key used to look up the value type mapping.
Returns
The ValueType contained in the given mapping.
Exceptions
CMSExceptionif 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
CMSExceptionif the operation fails due to an internal error.

Implements cms::MapMessage.

virtual bool activemq::commands::ActiveMQMapMessage::isMarshalAware ( ) const
inlinevirtual

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
nameString 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
namethe name of the boolean
valuethe 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
namethe name of the Byte
valuethe 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
nameThe name of the Bytes
valueThe 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
namethe name of the Char
valuethe 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
nameThe name of the Double
valueThe 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
nameThe name of the Float
valueThe 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
nameThe name of the Int
valueThe 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
nameThe name of the Long
valueThe 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
nameThe name of the Short
valueThe 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
nameThe name of the String
valueThe 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

const unsigned char activemq::commands::ActiveMQMapMessage::ID_ACTIVEMQMAPMESSAGE = 25
static

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