activemq::commands::ActiveMQTextMessage Class Reference

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

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

Public Member Functions

 ActiveMQTextMessage ()
virtual ~ActiveMQTextMessage () throw ()
virtual unsigned char getDataStructureType () const
 Get the DataStructure Type as defined in CommandTypes.h.
virtual ActiveMQTextMessagecloneDataStructure () 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 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 ()
 Clears out the body of the message.
virtual void beforeMarshal (wireformat::WireFormat *wireFormat)
 Called before marshaling is started to prepare the object to be marshaled.
virtual unsigned int getSize () const
 Returns the Size of this message in Bytes.
virtual cms::TextMessageclone () const
 Clone this message exactly, returns a new instance that the caller is required to delete.
virtual std::string getText () const
 Gets the message character buffer.
virtual void setText (const char *msg)
 Sets the message contents, does not take ownership of the passed char*, but copies it instead.
virtual void setText (const std::string &msg)
 Sets the message contents.

Data Fields

std::auto_ptr< std::string > text

Static Public Attributes

static const unsigned char ID_ACTIVEMQTEXTMESSAGE = 28

Constructor & Destructor Documentation

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

Member Function Documentation

virtual void activemq::commands::ActiveMQTextMessage::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::ActiveMQTextMessage::clearBody (  )  [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::TextMessage >.

virtual cms::TextMessage* activemq::commands::ActiveMQTextMessage::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 ActiveMQTextMessage* activemq::commands::ActiveMQTextMessage::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::ActiveMQTextMessage::copyDataStructure ( const DataStructure src  )  [virtual]

Reimplemented from activemq::commands::Message.

virtual bool activemq::commands::ActiveMQTextMessage::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::TextMessage >.

virtual unsigned char activemq::commands::ActiveMQTextMessage::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 unsigned int activemq::commands::ActiveMQTextMessage::getSize (  )  const [virtual]

Returns the Size of this message in Bytes.

Returns:
number of bytes this message equates to.

Reimplemented from activemq::commands::Message.

virtual std::string activemq::commands::ActiveMQTextMessage::getText (  )  const [virtual]

Gets the message character buffer.

Returns:
The message character buffer.
Exceptions:
CMSException - if an internal error occurs.

Implements cms::TextMessage.

virtual void activemq::commands::ActiveMQTextMessage::setText ( const std::string &  msg  )  [virtual]

Sets the message contents.

Parameters:
msg The message buffer.
Exceptions:
CMSException - if an internal error occurs.
MessageNotWriteableException - if the message is in read-only mode..

Implements cms::TextMessage.

virtual void activemq::commands::ActiveMQTextMessage::setText ( const char *  msg  )  [virtual]

Sets the message contents, does not take ownership of the passed char*, but copies it instead.

Parameters:
msg The message buffer.
Exceptions:
CMSException - if an internal error occurs.
MessageNotWriteableException - if the message is in read-only mode..

Implements cms::TextMessage.

virtual std::string activemq::commands::ActiveMQTextMessage::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

std::auto_ptr<std::string> activemq::commands::ActiveMQTextMessage::text [mutable]

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