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

Public Member Functions | |
| ActiveMQStreamMessage () | |
| virtual | ~ActiveMQStreamMessage () throw () |
| virtual unsigned char | getDataStructureType () const |
| Get the DataStructure Type as defined in CommandTypes.h. | |
| virtual ActiveMQStreamMessage * | 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 void | onSend () |
| Allows derived Message classes to perform tasks before a message is sent. | |
| virtual cms::StreamMessage * | clone () const |
| Clone this message exactly, returns a new instance that the caller is required to delete. | |
| virtual void | clearBody () |
| Clears out the body of the message. | |
| virtual ValueType | getNextValueType () const |
| Returns the value type for the element in the StreamMessage. | |
| 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 Stream message stream. | |
| virtual void | writeBoolean (bool value) |
| Writes a boolean to the Stream message stream as a 1-byte value. | |
| virtual unsigned char | readByte () const |
| Reads a Byte from the Stream message stream. | |
| virtual void | writeByte (unsigned char value) |
| Writes a byte to the Stream message stream as a 1-byte value. | |
| virtual int | readBytes (std::vector< unsigned char > &value) const |
| Reads a byte array from the Stream message stream. | |
| virtual void | writeBytes (const std::vector< unsigned char > &value) |
| Writes a byte array to the Stream 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 Stream message stream. | |
| virtual void | writeBytes (const unsigned char *value, int offset, int length) |
| Writes a portion of a byte array to the Stream message stream. | |
| virtual char | readChar () const |
| Reads a Char from the Stream message stream. | |
| virtual void | writeChar (char value) |
| Writes a char to the Stream message stream as a 1-byte value. | |
| virtual float | readFloat () const |
| Reads a 32 bit float from the Stream message stream. | |
| virtual void | writeFloat (float value) |
| Writes a float to the Stream message stream as a 4 byte value. | |
| virtual double | readDouble () const |
| Reads a 64 bit double from the Stream message stream. | |
| virtual void | writeDouble (double value) |
| Writes a double to the Stream message stream as a 8 byte value. | |
| virtual short | readShort () const |
| Reads a 16 bit signed short from the Stream message stream. | |
| virtual void | writeShort (short value) |
| Writes a signed short to the Stream message stream as a 2 byte value. | |
| virtual unsigned short | readUnsignedShort () const |
| Reads a 16 bit unsigned short from the Stream message stream. | |
| virtual void | writeUnsignedShort (unsigned short value) |
| Writes a unsigned short to the Stream message stream as a 2 byte value. | |
| virtual int | readInt () const |
| Reads a 32 bit signed integer from the Stream message stream. | |
| virtual void | writeInt (int value) |
| Writes a signed int to the Stream message stream as a 4 byte value. | |
| virtual long long | readLong () const |
| Reads a 64 bit long from the Stream message stream. | |
| virtual void | writeLong (long long value) |
| Writes a long long to the Stream message stream as a 8 byte value. | |
| virtual std::string | readString () const |
| Reads an ASCII String from the Stream message stream. | |
| virtual void | writeString (const std::string &value) |
| Writes an ASCII String to the Stream message stream. | |
Static Public Attributes | |
| static const unsigned char | ID_ACTIVEMQSTREAMMESSAGE = 27 |
| activemq::commands::ActiveMQStreamMessage::ActiveMQStreamMessage | ( | ) |
| virtual activemq::commands::ActiveMQStreamMessage::~ActiveMQStreamMessage | ( | ) | throw () [virtual] |
| virtual void activemq::commands::ActiveMQStreamMessage::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::StreamMessage >.
| virtual cms::StreamMessage* activemq::commands::ActiveMQStreamMessage::clone | ( | ) | const [inline, virtual] |
Clone this message exactly, returns a new instance that the caller is required to delete.
Implements cms::Message.
References activemq::commands::Message::setReadOnlyBody(), and activemq::commands::Message::setReadOnlyProperties().
| virtual ActiveMQStreamMessage* activemq::commands::ActiveMQStreamMessage::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::ActiveMQStreamMessage::copyDataStructure | ( | const DataStructure * | src | ) | [virtual] |
Reimplemented from activemq::commands::Message.
| virtual bool activemq::commands::ActiveMQStreamMessage::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::StreamMessage >.
| virtual unsigned char activemq::commands::ActiveMQStreamMessage::getDataStructureType | ( | ) | const [virtual] |
Get the DataStructure Type as defined in CommandTypes.h.
Reimplemented from activemq::commands::Message.
| virtual ValueType activemq::commands::ActiveMQStreamMessage::getNextValueType | ( | ) | const [virtual] |
Returns the value type for the element in the StreamMessage.
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. The call can fail if the StreamMessage is currently in the middle of a ready of a Byte array.
| CMSException | if no property exists that matches the requested key. | |
| MessageEOFException | - if unexpected end of message stream has been reached. | |
| MessageFormatException | - if the message contains invalid data. | |
| MessageNotReadableException | - if the message is in write-only mode. |
Implements cms::StreamMessage.
| virtual void activemq::commands::ActiveMQStreamMessage::onSend | ( | ) | [virtual] |
Allows derived Message classes to perform tasks before a message is sent.
Reimplemented from activemq::commands::ActiveMQMessageTemplate< cms::StreamMessage >.
| virtual bool activemq::commands::ActiveMQStreamMessage::readBoolean | ( | ) | const [virtual] |
Reads a Boolean from the Stream message stream.
| CMSException | - if the CMS provider fails to read the message due to some internal error. | |
| MessageEOFException | - if unexpected end of message stream has been reached. | |
| MessageFormatException | - if this type conversion is invalid. | |
| MessageNotReadableException | - if the message is in write-only mode. |
Implements cms::StreamMessage.
| virtual unsigned char activemq::commands::ActiveMQStreamMessage::readByte | ( | ) | const [virtual] |
Reads a Byte from the Stream message stream.
| CMSException | - if the CMS provider fails to read the message due to some internal error. | |
| MessageEOFException | - if unexpected end of message stream has been reached. | |
| MessageFormatException | - if this type conversion is invalid. | |
| MessageNotReadableException | - if the message is in write-only mode. |
Implements cms::StreamMessage.
| virtual int activemq::commands::ActiveMQStreamMessage::readBytes | ( | unsigned char * | buffer, | |
| int | length | |||
| ) | const [virtual] |
Reads a portion of the Stream 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 CMSException 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 message stream has been reached. | |
| MessageFormatException | - if this type conversion is invalid. | |
| MessageNotReadableException | - if the message is in write-only mode. |
Implements cms::StreamMessage.
| virtual int activemq::commands::ActiveMQStreamMessage::readBytes | ( | std::vector< unsigned char > & | value | ) | const [virtual] |
Reads a byte array from the Stream 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 message stream has been reached. | |
| MessageFormatException | - if this type conversion is invalid. | |
| MessageNotReadableException | - if the message is in write-only mode. |
Implements cms::StreamMessage.
| virtual char activemq::commands::ActiveMQStreamMessage::readChar | ( | ) | const [virtual] |
Reads a Char from the Stream message stream.
| CMSException | - if the CMS provider fails to read the message due to some internal error. | |
| MessageEOFException | - if unexpected end of message stream has been reached. | |
| MessageFormatException | - if this type conversion is invalid. | |
| MessageNotReadableException | - if the message is in write-only mode. |
Implements cms::StreamMessage.
| virtual double activemq::commands::ActiveMQStreamMessage::readDouble | ( | ) | const [virtual] |
Reads a 64 bit double from the Stream message stream.
| CMSException | - if the CMS provider fails to read the message due to some internal error. | |
| MessageEOFException | - if unexpected end of message stream has been reached. | |
| MessageFormatException | - if this type conversion is invalid. | |
| MessageNotReadableException | - if the message is in write-only mode. |
Implements cms::StreamMessage.
| virtual float activemq::commands::ActiveMQStreamMessage::readFloat | ( | ) | const [virtual] |
Reads a 32 bit float from the Stream message stream.
| CMSException | - if the CMS provider fails to read the message due to some internal error. | |
| MessageEOFException | - if unexpected end of message stream has been reached. | |
| MessageFormatException | - if this type conversion is invalid. | |
| MessageNotReadableException | - if the message is in write-only mode. |
Implements cms::StreamMessage.
| virtual int activemq::commands::ActiveMQStreamMessage::readInt | ( | ) | const [virtual] |
Reads a 32 bit signed integer from the Stream message stream.
| CMSException | - if the CMS provider fails to read the message due to some internal error. | |
| MessageEOFException | - if unexpected end of message stream has been reached. | |
| MessageFormatException | - if this type conversion is invalid. | |
| MessageNotReadableException | - if the message is in write-only mode. |
Implements cms::StreamMessage.
| virtual long long activemq::commands::ActiveMQStreamMessage::readLong | ( | ) | const [virtual] |
Reads a 64 bit long from the Stream message stream.
| CMSException | - if the CMS provider fails to read the message due to some internal error. | |
| MessageEOFException | - if unexpected end of message stream has been reached. | |
| MessageFormatException | - if this type conversion is invalid. | |
| MessageNotReadableException | - if the message is in write-only mode. |
Implements cms::StreamMessage.
| virtual short activemq::commands::ActiveMQStreamMessage::readShort | ( | ) | const [virtual] |
Reads a 16 bit signed short from the Stream message stream.
| CMSException | - if the CMS provider fails to read the message due to some internal error. | |
| MessageEOFException | - if unexpected end of message stream has been reached. | |
| MessageFormatException | - if this type conversion is invalid. | |
| MessageNotReadableException | - if the message is in write-only mode. |
Implements cms::StreamMessage.
| virtual std::string activemq::commands::ActiveMQStreamMessage::readString | ( | ) | const [virtual] |
Reads an ASCII String from the Stream message stream.
| CMSException | - if the CMS provider fails to read the message due to some internal error. | |
| MessageEOFException | - if unexpected end of message stream has been reached. | |
| MessageFormatException | - if this type conversion is invalid. | |
| MessageNotReadableException | - if the message is in write-only mode. |
Implements cms::StreamMessage.
| virtual unsigned short activemq::commands::ActiveMQStreamMessage::readUnsignedShort | ( | ) | const [virtual] |
Reads a 16 bit unsigned short from the Stream message stream.
| CMSException | - if the CMS provider fails to read the message due to some internal error. | |
| MessageEOFException | - if unexpected end of message stream has been reached. | |
| MessageFormatException | - if this type conversion is invalid. | |
| MessageNotReadableException | - if the message is in write-only mode. |
Implements cms::StreamMessage.
| virtual void activemq::commands::ActiveMQStreamMessage::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::StreamMessage.
| virtual std::string activemq::commands::ActiveMQStreamMessage::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::ActiveMQStreamMessage::writeBoolean | ( | bool | value | ) | [virtual] |
Writes a boolean to the Stream 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::StreamMessage.
| virtual void activemq::commands::ActiveMQStreamMessage::writeByte | ( | unsigned char | value | ) | [virtual] |
Writes a byte to the Stream 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::StreamMessage.
| virtual void activemq::commands::ActiveMQStreamMessage::writeBytes | ( | const unsigned char * | value, | |
| int | offset, | |||
| int | length | |||
| ) | [virtual] |
Writes a portion of a byte array to the Stream 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::StreamMessage.
| virtual void activemq::commands::ActiveMQStreamMessage::writeBytes | ( | const std::vector< unsigned char > & | value | ) | [virtual] |
Writes a byte array to the Stream 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::StreamMessage.
| virtual void activemq::commands::ActiveMQStreamMessage::writeChar | ( | char | value | ) | [virtual] |
Writes a char to the Stream 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::StreamMessage.
| virtual void activemq::commands::ActiveMQStreamMessage::writeDouble | ( | double | value | ) | [virtual] |
Writes a double to the Stream 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::StreamMessage.
| virtual void activemq::commands::ActiveMQStreamMessage::writeFloat | ( | float | value | ) | [virtual] |
Writes a float to the Stream 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::StreamMessage.
| virtual void activemq::commands::ActiveMQStreamMessage::writeInt | ( | int | value | ) | [virtual] |
Writes a signed int to the Stream 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::StreamMessage.
| virtual void activemq::commands::ActiveMQStreamMessage::writeLong | ( | long long | value | ) | [virtual] |
Writes a long long to the Stream 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::StreamMessage.
| virtual void activemq::commands::ActiveMQStreamMessage::writeShort | ( | short | value | ) | [virtual] |
Writes a signed short to the Stream 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::StreamMessage.
| virtual void activemq::commands::ActiveMQStreamMessage::writeString | ( | const std::string & | value | ) | [virtual] |
Writes an ASCII String to the Stream 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::StreamMessage.
| virtual void activemq::commands::ActiveMQStreamMessage::writeUnsignedShort | ( | unsigned short | value | ) | [virtual] |
Writes a unsigned short to the Stream 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::StreamMessage.
const unsigned char activemq::commands::ActiveMQStreamMessage::ID_ACTIVEMQSTREAMMESSAGE = 27 [static] |
1.6.1