activemq-cpp-3.9.5
|
#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) |
Copy the contents of the passed object into this objects members, overwriting any existing data. | |
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. | |
![]() | |
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 |
![]() | |
virtual | ~Command () |
![]() | |
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 |
![]() | |
virtual | ~DataStructure () |
![]() | |
virtual | ~MarshalAware () |
virtual void | beforeMarshal (WireFormat *wireFormat)=0 |
Called before marshaling is started to prepare the object to be marshaled. | |
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_ACTIVEMQSTREAMMESSAGE |
Additional Inherited Members | |
Defines the Type Identifiers used to identify the type contained within a specific Message property or MapMessage keyed value. More... |
activemq::commands::ActiveMQStreamMessage::ActiveMQStreamMessage | ( | ) |
|
virtual |
|
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 >.
References clearBody().
Referenced by clearBody().
|
virtual |
Clone this message exactly, returns a new instance that the caller is required to delete.
Implements cms::Message.
References clone(), and const.
Referenced by clone().
|
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.
References cloneDataStructure(), and const.
Referenced by cloneDataStructure().
|
virtual |
Copy the contents of the passed object into this objects members, overwriting any existing data.
Reimplemented from activemq::commands::Message.
References const, and copyDataStructure().
Referenced by copyDataStructure().
|
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 >.
References const, and equals().
Referenced by equals().
|
virtual |
Get the DataStructure Type as defined in CommandTypes.h.
Reimplemented from activemq::commands::Message.
References const, and getDataStructureType().
Referenced by getDataStructureType().
|
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.
References const, and getNextValueType().
Referenced by getNextValueType().
|
virtual |
Allows derived Message classes to perform tasks before a message is sent.
Reimplemented from activemq::commands::ActiveMQMessageTemplate< cms::StreamMessage >.
References onSend().
Referenced by onSend().
|
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.
References const, and readBoolean().
Referenced by readBoolean().
|
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.
References const, and readByte().
Referenced by readByte().
|
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.
References const, and readBytes().
Referenced by readBytes(), and readBytes().
|
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.
References const, and readBytes().
|
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.
References const, and readChar().
Referenced by readChar().
|
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.
References const, and readDouble().
Referenced by readDouble().
|
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.
References const, and readFloat().
Referenced by readFloat().
|
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.
References const, and readInt().
Referenced by readInt().
|
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.
References const, and readLong().
Referenced by readLong().
|
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.
References const, and readShort().
Referenced by readShort().
|
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.
References const, and readString().
Referenced by readString().
|
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.
References const, and readUnsignedShort().
Referenced by readUnsignedShort().
|
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.
References reset().
Referenced by reset().
|
virtual |
Returns a string containing the information for this DataStructure such as its type and value of its elements.
Reimplemented from activemq::commands::Message.
References const, and toString().
Referenced by toString().
|
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.
References writeBoolean().
Referenced by writeBoolean().
|
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.
References writeByte().
Referenced by writeByte().
|
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.
References const, and writeBytes().
Referenced by writeBytes(), and writeBytes().
|
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.
References const, and writeBytes().
|
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.
References writeChar().
Referenced by writeChar().
|
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.
References writeDouble().
Referenced by writeDouble().
|
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.
References writeFloat().
Referenced by writeFloat().
|
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.
References writeInt().
Referenced by writeInt().
|
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.
References writeLong().
Referenced by writeLong().
|
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.
References writeShort().
Referenced by writeShort().
|
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.
References const, and writeString().
Referenced by writeString().
|
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.
References writeUnsignedShort().
Referenced by writeUnsignedShort().
|
static |