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

Public Member Functions | |
| ActiveMQBytesMessage () | |
| virtual | ~ActiveMQBytesMessage () throw () |
| virtual unsigned char | getDataStructureType () const |
| Get the DataStructure Type as defined in CommandTypes.h. | |
| virtual ActiveMQBytesMessage * | cloneDataStructure () 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 cms::BytesMessage * | clone () const |
| Clones this message. | |
| virtual void | clearBody () |
| Clears out the body of the message. | |
| virtual void | onSend () |
| Allows derived Message classes to perform tasks before a message is sent. | |
| virtual void | setBodyBytes (const unsigned char *buffer, int numBytes) |
| sets the bytes given to the message body. | |
| virtual unsigned char * | getBodyBytes () const |
| Gets the bytes that are contained in this message and returns them in a newly allocated array that becomes the property of the caller. | |
| virtual int | getBodyLength () const |
| Returns the number of bytes contained in the body of this message. | |
| virtual void | reset () |
| Puts the message body in read-only mode and repositions the stream of bytes to the beginning. | |
| virtual bool | readBoolean () const |
| Reads a Boolean from the Bytes message stream. | |
| virtual void | writeBoolean (bool value) |
| Writes a boolean to the bytes message stream as a 1-byte value. | |
| virtual unsigned char | readByte () const |
| Reads a Byte from the Bytes message stream. | |
| virtual void | writeByte (unsigned char value) |
| Writes a byte to the bytes message stream as a 1-byte value. | |
| virtual int | readBytes (std::vector< unsigned char > &value) const |
| Reads a byte array from the bytes message stream. | |
| virtual void | writeBytes (const std::vector< unsigned char > &value) |
| Writes a byte array to the bytes message stream using the vector size as the number of bytes to write. | |
| virtual int | readBytes (unsigned char *buffer, int length) const |
| Reads a portion of the bytes message stream. | |
| virtual void | writeBytes (const unsigned char *value, int offset, int length) |
| Writes a portion of a byte array to the bytes message stream. | |
| virtual char | readChar () const |
| Reads a Char from the Bytes message stream. | |
| virtual void | writeChar (char value) |
| Writes a char to the bytes message stream as a 1-byte value. | |
| virtual float | readFloat () const |
| Reads a 32 bit float from the Bytes message stream. | |
| virtual void | writeFloat (float value) |
| Writes a float to the bytes message stream as a 4 byte value. | |
| virtual double | readDouble () const |
| Reads a 64 bit double from the Bytes message stream. | |
| virtual void | writeDouble (double value) |
| Writes a double to the bytes message stream as a 8 byte value. | |
| virtual short | readShort () const |
| Reads a 16 bit signed short from the Bytes message stream. | |
| virtual void | writeShort (short value) |
| Writes a signed short to the bytes message stream as a 2 byte value. | |
| virtual unsigned short | readUnsignedShort () const |
| Reads a 16 bit unsigned short from the Bytes message stream. | |
| virtual void | writeUnsignedShort (unsigned short value) |
| Writes a unsigned short to the bytes message stream as a 2 byte value. | |
| virtual int | readInt () const |
| Reads a 32 bit signed integer from the Bytes message stream. | |
| virtual void | writeInt (int value) |
| Writes a signed int to the bytes message stream as a 4 byte value. | |
| virtual long long | readLong () const |
| Reads a 64 bit long from the Bytes message stream. | |
| virtual void | writeLong (long long value) |
| Writes a long long to the bytes message stream as a 8 byte value. | |
| virtual std::string | readString () const |
| Reads an ASCII String from the Bytes message stream. | |
| virtual void | writeString (const std::string &value) |
| Writes an ASCII String to the Bytes message stream. | |
| virtual std::string | readUTF () const |
| Reads an UTF String from the BytesMessage stream. | |
| virtual void | writeUTF (const std::string &value) |
| Writes an UTF String to the BytesMessage stream. | |
Static Public Attributes | |
| static const unsigned char | ID_ACTIVEMQBYTESMESSAGE = 24 |
| activemq::commands::ActiveMQBytesMessage::ActiveMQBytesMessage | ( | ) |
| virtual activemq::commands::ActiveMQBytesMessage::~ActiveMQBytesMessage | ( | ) | throw () [virtual] |
| virtual void activemq::commands::ActiveMQBytesMessage::clearBody | ( | ) | [virtual] |
Clears out the body of the message.
This does not clear the headers or properties.
| CMSException | - if an internal error occurs. |
Reimplemented from activemq::commands::ActiveMQMessageTemplate< cms::BytesMessage >.
| virtual cms::BytesMessage* activemq::commands::ActiveMQBytesMessage::clone | ( | ) | const [inline, virtual] |
Clones this message.
| CMSException | - if an internal error occurs while cloning the Message. |
Implements cms::BytesMessage.
References activemq::commands::Message::setReadOnlyBody(), and activemq::commands::Message::setReadOnlyProperties().
| virtual ActiveMQBytesMessage* activemq::commands::ActiveMQBytesMessage::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.
Reimplemented from activemq::commands::Message.
| virtual void activemq::commands::ActiveMQBytesMessage::copyDataStructure | ( | const DataStructure * | src | ) | [virtual] |
Reimplemented from activemq::commands::Message.
| virtual bool activemq::commands::ActiveMQBytesMessage::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.
Reimplemented from activemq::commands::ActiveMQMessageTemplate< cms::BytesMessage >.
| virtual unsigned char* activemq::commands::ActiveMQBytesMessage::getBodyBytes | ( | ) | const [virtual] |
Gets the bytes that are contained in this message and returns them in a newly allocated array that becomes the property of the caller.
This is a copy of the data contained in this message, changing the value contained in this array has no effect on the data contained in this message.
| CMSException | - If an internal error occurs. | |
| MessageNotReadableException | - If the message is in Write Only Mode. |
Implements cms::BytesMessage.
| virtual int activemq::commands::ActiveMQBytesMessage::getBodyLength | ( | ) | const [virtual] |
Returns the number of bytes contained in the body of this message.
| CMSException | - If an internal error occurs. | |
| MessageNotReadableException | - If the message is in Write Only Mode. |
Implements cms::BytesMessage.
| virtual unsigned char activemq::commands::ActiveMQBytesMessage::getDataStructureType | ( | ) | const [virtual] |
Get the DataStructure Type as defined in CommandTypes.h.
Reimplemented from activemq::commands::Message.
| virtual void activemq::commands::ActiveMQBytesMessage::onSend | ( | ) | [virtual] |
Allows derived Message classes to perform tasks before a message is sent.
Reimplemented from activemq::commands::ActiveMQMessageTemplate< cms::BytesMessage >.
| virtual bool activemq::commands::ActiveMQBytesMessage::readBoolean | ( | ) | const [virtual] |
Reads a Boolean from the Bytes message stream.
| CMSException | - if the CMS provider fails to read the message due to some internal error. | |
| MessageEOFException | - if unexpected end of bytes stream has been reached. | |
| MessageNotReadableException | - if the message is in write-only mode. |
Implements cms::BytesMessage.
| virtual unsigned char activemq::commands::ActiveMQBytesMessage::readByte | ( | ) | const [virtual] |
Reads a Byte from the Bytes message stream.
| CMSException | - if the CMS provider fails to read the message due to some internal error. | |
| MessageEOFException | - if unexpected end of bytes stream has been reached. | |
| MessageNotReadableException | - if the message is in write-only mode. |
Implements cms::BytesMessage.
| virtual int activemq::commands::ActiveMQBytesMessage::readBytes | ( | unsigned char * | buffer, | |
| int | length | |||
| ) | const [virtual] |
Reads a portion of the bytes message stream.
If the length of array value is less than the number of bytes remaining to be read from the stream, the array should be filled. A subsequent call reads the next increment, and so on.
If the number of bytes remaining in the stream is less than the length of array value, the bytes should be read into the array. The return value of the total number of bytes read will be less than the length of the array, indicating that there are no more bytes left to be read from the stream. The next read of the stream returns -1.
If length is negative, or length is greater than the length of the array value, then an IndexOutOfBoundsException is thrown. No bytes will be read from the stream for this exception case.
| buffer | the buffer into which the data is read | |
| length | the number of bytes to read; must be less than or equal to value.length |
| CMSException | - if the CMS provider fails to read the message due to some internal error. | |
| MessageEOFException | - if unexpected end of bytes stream has been reached. | |
| MessageNotReadableException | - if the message is in write-only mode. |
Implements cms::BytesMessage.
| virtual int activemq::commands::ActiveMQBytesMessage::readBytes | ( | std::vector< unsigned char > & | value | ) | const [virtual] |
Reads a byte array from the bytes message stream.
If the length of vector value is less than the number of bytes remaining to be read from the stream, the vector should be filled. A subsequent call reads the next increment, and so on.
If the number of bytes remaining in the stream is less than the length of vector value, the bytes should be read into the vector. The return value of the total number of bytes read will be less than the length of the vector, indicating that there are no more bytes left to be read from the stream. The next read of the stream returns -1.
| value | buffer to place data in |
| CMSException | - if the CMS provider fails to read the message due to some internal error. | |
| MessageEOFException | - if unexpected end of bytes stream has been reached. | |
| MessageNotReadableException | - if the message is in write-only mode. |
Implements cms::BytesMessage.
| virtual char activemq::commands::ActiveMQBytesMessage::readChar | ( | ) | const [virtual] |
Reads a Char from the Bytes message stream.
| CMSException | - if the CMS provider fails to read the message due to some internal error. | |
| MessageEOFException | - if unexpected end of bytes stream has been reached. | |
| MessageNotReadableException | - if the message is in write-only mode. |
Implements cms::BytesMessage.
| virtual double activemq::commands::ActiveMQBytesMessage::readDouble | ( | ) | const [virtual] |
Reads a 64 bit double from the Bytes message stream.
| CMSException | - if the CMS provider fails to read the message due to some internal error. | |
| MessageEOFException | - if unexpected end of bytes stream has been reached. | |
| MessageNotReadableException | - if the message is in write-only mode. |
Implements cms::BytesMessage.
| virtual float activemq::commands::ActiveMQBytesMessage::readFloat | ( | ) | const [virtual] |
Reads a 32 bit float from the Bytes message stream.
| CMSException | - if the CMS provider fails to read the message due to some internal error. | |
| MessageEOFException | - if unexpected end of bytes stream has been reached. | |
| MessageNotReadableException | - if the message is in write-only mode. |
Implements cms::BytesMessage.
| virtual int activemq::commands::ActiveMQBytesMessage::readInt | ( | ) | const [virtual] |
Reads a 32 bit signed integer from the Bytes message stream.
| CMSException | - if the CMS provider fails to read the message due to some internal error. | |
| MessageEOFException | - if unexpected end of bytes stream has been reached. | |
| MessageNotReadableException | - if the message is in write-only mode. |
Implements cms::BytesMessage.
| virtual long long activemq::commands::ActiveMQBytesMessage::readLong | ( | ) | const [virtual] |
Reads a 64 bit long from the Bytes message stream.
| CMSException | - if the CMS provider fails to read the message due to some internal error. | |
| MessageEOFException | - if unexpected end of bytes stream has been reached. | |
| MessageNotReadableException | - if the message is in write-only mode. |
Implements cms::BytesMessage.
| virtual short activemq::commands::ActiveMQBytesMessage::readShort | ( | ) | const [virtual] |
Reads a 16 bit signed short from the Bytes message stream.
| CMSException | - if the CMS provider fails to read the message due to some internal error. | |
| MessageEOFException | - if unexpected end of bytes stream has been reached. | |
| MessageNotReadableException | - if the message is in write-only mode. |
Implements cms::BytesMessage.
| virtual std::string activemq::commands::ActiveMQBytesMessage::readString | ( | ) | const [virtual] |
Reads an ASCII String from the Bytes message stream.
| CMSException | - if the CMS provider fails to read the message due to some internal error. | |
| MessageEOFException | - if unexpected end of bytes stream has been reached. | |
| MessageNotReadableException | - if the message is in write-only mode. |
Implements cms::BytesMessage.
| virtual unsigned short activemq::commands::ActiveMQBytesMessage::readUnsignedShort | ( | ) | const [virtual] |
Reads a 16 bit unsigned short from the Bytes message stream.
| CMSException | - if the CMS provider fails to read the message due to some internal error. | |
| MessageEOFException | - if unexpected end of bytes stream has been reached. | |
| MessageNotReadableException | - if the message is in write-only mode. |
Implements cms::BytesMessage.
| virtual std::string activemq::commands::ActiveMQBytesMessage::readUTF | ( | ) | const [virtual] |
Reads an UTF String from the BytesMessage stream.
| CMSException | - if the CMS provider fails to read the message due to some internal error. | |
| MessageEOFException | - if unexpected end of bytes stream has been reached. | |
| MessageNotReadableException | - if the message is in write-only mode. |
Implements cms::BytesMessage.
| virtual void activemq::commands::ActiveMQBytesMessage::reset | ( | ) | [virtual] |
Puts the message body in read-only mode and repositions the stream of bytes to the beginning.
| CMSException | - If the provider fails to perform the reset operation. | |
| MessageFormatException | - If the Message has an invalid format. |
Implements cms::BytesMessage.
| virtual void activemq::commands::ActiveMQBytesMessage::setBodyBytes | ( | const unsigned char * | buffer, | |
| int | numBytes | |||
| ) | [virtual] |
sets the bytes given to the message body.
| buffer | Byte Buffer to copy | |
| numBytes | Number of bytes in Buffer to copy |
| CMSException | - If an internal error occurs. | |
| MessageNotWriteableException | - if in Read Only Mode. |
Implements cms::BytesMessage.
| virtual std::string activemq::commands::ActiveMQBytesMessage::toString | ( | ) | const [virtual] |
Returns a string containing the information for this DataStructure such as its type and value of its elements.
Reimplemented from activemq::commands::Message.
| virtual void activemq::commands::ActiveMQBytesMessage::writeBoolean | ( | bool | value | ) | [virtual] |
Writes a boolean to the bytes message stream as a 1-byte value.
The value true is written as the value (byte)1; the value false is written as the value (byte)0.
| value | boolean to write to the stream |
| CMSException | - if the CMS provider fails to write the message due to some internal error. | |
| MessageNotWriteableException | - if the message is in read-only mode. |
Implements cms::BytesMessage.
| virtual void activemq::commands::ActiveMQBytesMessage::writeByte | ( | unsigned char | value | ) | [virtual] |
Writes a byte to the bytes message stream as a 1-byte value.
| value | byte to write to the stream |
| CMSException | - if the CMS provider fails to write the message due to some internal error. | |
| MessageNotWriteableException | - if the message is in read-only mode. |
Implements cms::BytesMessage.
| virtual void activemq::commands::ActiveMQBytesMessage::writeBytes | ( | const unsigned char * | value, | |
| int | offset, | |||
| int | length | |||
| ) | [virtual] |
Writes a portion of a byte array to the bytes message stream.
size as the number of bytes to write.
| value | bytes to write to the stream | |
| offset | the initial offset within the byte array | |
| length | the number of bytes to use |
| CMSException | - if the CMS provider fails to write the message due to some internal error. | |
| MessageNotWriteableException | - if the message is in read-only mode. |
Implements cms::BytesMessage.
| virtual void activemq::commands::ActiveMQBytesMessage::writeBytes | ( | const std::vector< unsigned char > & | value | ) | [virtual] |
Writes a byte array to the bytes message stream using the vector size as the number of bytes to write.
| value | bytes to write to the stream |
| CMSException | - if the CMS provider fails to write the message due to some internal error. | |
| MessageNotWriteableException | - if the message is in read-only mode. |
Implements cms::BytesMessage.
| virtual void activemq::commands::ActiveMQBytesMessage::writeChar | ( | char | value | ) | [virtual] |
Writes a char to the bytes message stream as a 1-byte value.
| value | char to write to the stream |
| CMSException | - if the CMS provider fails to write the message due to some internal error. | |
| MessageNotWriteableException | - if the message is in read-only mode. |
Implements cms::BytesMessage.
| virtual void activemq::commands::ActiveMQBytesMessage::writeDouble | ( | double | value | ) | [virtual] |
Writes a double to the bytes message stream as a 8 byte value.
| value | double to write to the stream |
| CMSException | - if the CMS provider fails to write the message due to some internal error. | |
| MessageNotWriteableException | - if the message is in read-only mode. |
Implements cms::BytesMessage.
| virtual void activemq::commands::ActiveMQBytesMessage::writeFloat | ( | float | value | ) | [virtual] |
Writes a float to the bytes message stream as a 4 byte value.
| value | float to write to the stream |
| CMSException | - if the CMS provider fails to write the message due to some internal error. | |
| MessageNotWriteableException | - if the message is in read-only mode. |
Implements cms::BytesMessage.
| virtual void activemq::commands::ActiveMQBytesMessage::writeInt | ( | int | value | ) | [virtual] |
Writes a signed int to the bytes message stream as a 4 byte value.
| value | signed int to write to the stream |
| CMSException | - if the CMS provider fails to write the message due to some internal error. | |
| MessageNotWriteableException | - if the message is in read-only mode. |
Implements cms::BytesMessage.
| virtual void activemq::commands::ActiveMQBytesMessage::writeLong | ( | long long | value | ) | [virtual] |
Writes a long long to the bytes message stream as a 8 byte value.
| value | signed long long to write to the stream |
| CMSException | - if the CMS provider fails to write the message due to some internal error. | |
| MessageNotWriteableException | - if the message is in read-only mode. |
Implements cms::BytesMessage.
| virtual void activemq::commands::ActiveMQBytesMessage::writeShort | ( | short | value | ) | [virtual] |
Writes a signed short to the bytes message stream as a 2 byte value.
| value | signed short to write to the stream |
| CMSException | - if the CMS provider fails to write the message due to some internal error. | |
| MessageNotWriteableException | - if the message is in read-only mode. |
Implements cms::BytesMessage.
| virtual void activemq::commands::ActiveMQBytesMessage::writeString | ( | const std::string & | value | ) | [virtual] |
Writes an ASCII String to the Bytes message stream.
| value | String to write to the stream |
| CMSException | - if the CMS provider fails to write the message due to some internal error. | |
| MessageNotWriteableException | - if the message is in read-only mode. |
Implements cms::BytesMessage.
| virtual void activemq::commands::ActiveMQBytesMessage::writeUnsignedShort | ( | unsigned short | value | ) | [virtual] |
Writes a unsigned short to the bytes message stream as a 2 byte value.
| value | unsigned short to write to the stream |
| CMSException | - if the CMS provider fails to write the message due to some internal error. | |
| MessageNotWriteableException | - if the message is in read-only mode. |
Implements cms::BytesMessage.
| virtual void activemq::commands::ActiveMQBytesMessage::writeUTF | ( | const std::string & | value | ) | [virtual] |
Writes an UTF String to the BytesMessage stream.
| value | String to write to the stream |
| CMSException | - if the CMS provider fails to read the message due to some internal error. | |
| MessageNotWriteableException | - if the message is in read-only mode. |
Implements cms::BytesMessage.
const unsigned char activemq::commands::ActiveMQBytesMessage::ID_ACTIVEMQBYTESMESSAGE = 24 [static] |
1.6.1