activemq-cpp-3.9.5
|
#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) |
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 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. | |
![]() | |
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_ACTIVEMQBYTESMESSAGE |
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::ActiveMQBytesMessage::ActiveMQBytesMessage | ( | ) |
|
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::BytesMessage >.
References clearBody().
Referenced by clearBody().
|
virtual |
Clones this message.
CMSException | - if an internal error occurs while cloning the Message. |
Implements cms::BytesMessage.
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::BytesMessage >.
References const, and equals().
Referenced by equals().
|
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.
References const, and getBodyBytes().
Referenced by getBodyBytes().
|
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.
References const, and getBodyLength().
Referenced by getBodyLength().
|
virtual |
Get the DataStructure Type as defined in CommandTypes.h.
Reimplemented from activemq::commands::Message.
References const, and getDataStructureType().
Referenced by getDataStructureType().
|
virtual |
Allows derived Message classes to perform tasks before a message is sent.
Reimplemented from activemq::commands::ActiveMQMessageTemplate< cms::BytesMessage >.
References onSend().
Referenced by onSend().
|
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.
References const, and readBoolean().
Referenced by readBoolean().
|
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.
References const, and readByte().
Referenced by readByte().
|
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.
References const, and readBytes().
Referenced by readBytes(), and readBytes().
|
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.
References const, and readBytes().
|
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.
References const, and readChar().
Referenced by readChar().
|
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.
References const, and readDouble().
Referenced by readDouble().
|
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.
References const, and readFloat().
Referenced by readFloat().
|
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.
References const, and readInt().
Referenced by readInt().
|
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.
References const, and readLong().
Referenced by readLong().
|
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.
References const, and readShort().
Referenced by readShort().
|
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.
References const, and readString().
Referenced by readString().
|
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.
References const, and readUnsignedShort().
Referenced by readUnsignedShort().
|
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.
References const, and readUTF().
Referenced by readUTF().
|
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.
References reset().
Referenced by reset().
|
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.
References const, and setBodyBytes().
Referenced by setBodyBytes().
|
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 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.
References writeBoolean().
Referenced by writeBoolean().
|
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.
References writeByte().
Referenced by writeByte().
|
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.
References const, and writeBytes().
Referenced by writeBytes(), and writeBytes().
|
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.
References const, and writeBytes().
|
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.
References writeChar().
Referenced by writeChar().
|
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.
References writeDouble().
Referenced by writeDouble().
|
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.
References writeFloat().
Referenced by writeFloat().
|
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.
References writeInt().
Referenced by writeInt().
|
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.
References writeLong().
Referenced by writeLong().
|
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.
References writeShort().
Referenced by writeShort().
|
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.
References const, and writeString().
Referenced by writeString().
|
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.
References writeUnsignedShort().
Referenced by writeUnsignedShort().
|
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.
References const, and writeUTF().
Referenced by writeUTF().
|
static |