activemq-cpp-3.4.0

cms::TextMessage Class Reference

Interface for a text message. More...

#include <src/main/cms/TextMessage.h>

Inheritance diagram for cms::TextMessage:

Public Member Functions

virtual ~TextMessage () throw ()
virtual std::string getText () const =0
 Gets the message character buffer.
virtual void setText (const char *msg)=0
 Sets the message contents, does not take ownership of the passed char*, but copies it instead.
virtual void setText (const std::string &msg)=0
 Sets the message contents.

Detailed Description

Interface for a text message.

A TextMessage can contain any Text based pay load such as an XML Document or other Text based document.

Like all Messages, a TextMessage is received in Read-Only mode, any attempt to write to the Message will result in a MessageNotWritableException being thrown until the clearBody method is called which will erase the contents and place the message back in a read / write mode.

Since:
1.0

Constructor & Destructor Documentation

virtual cms::TextMessage::~TextMessage ( ) throw () [virtual]

Member Function Documentation

virtual std::string cms::TextMessage::getText ( ) const [pure virtual]

Gets the message character buffer.

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

Implemented in activemq::commands::ActiveMQTextMessage.

virtual void cms::TextMessage::setText ( const std::string &  msg) [pure virtual]

Sets the message contents.

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

Implemented in activemq::commands::ActiveMQTextMessage.

virtual void cms::TextMessage::setText ( const char *  msg) [pure virtual]

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

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

Implemented in activemq::commands::ActiveMQTextMessage.


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