A QABinaryMessage object is used to send a message containing a stream of uninterpreted bytes.
public class QABinaryMessage : QAMessage
All members of QABinaryMessage class, including all inherited members.
Name | Description |
---|---|
Virtual destructor. | |
Begins an enumeration of message property names. | |
Casts this QAMessage to a QABinaryMessage. | |
Casts this QAMessage to a QATextMessage. | |
Clears a message's properties. | |
Frees the resources associated with a message property name enumeration. | |
Gets the destination address for the QAMessage instance. | |
Returns the size of the message body in bytes. | |
Gets the value of the qa_bool property with the specified name. | |
Gets the value of the qa_byte property with the specified name. | |
Gets the value of the qa_double property with the specified name. | |
Gets the message's expiration time. | |
Gets the value of the qa_float property with the specified name. | |
Gets the ID of the message that this message is in reply to. | |
Gets the value of the qa_int property with the specified name. | |
Gets the value of the qa_long property with the specified name. | |
Gets the message ID. | |
Gets the message priority level. | |
Returns the type of a property with the given name. | |
Indicates whether the message has been previously received but not acknowledged. | |
Gets the address to which a reply to this message should be sent. | |
Gets the value of the qa_short property with the specified name. | |
Gets the value of the qa_string property with the specified name. | |
Gets the message timestamp. | |
Gets the message timestamp as a formatted string. | |
Returns the message property name for the given enumeration, returning -1 if there are no more property names. | |
Indicates whether a property value exists. | |
Reads a specified number of bytes starting from the unread portion of the QABinaryMessage instance's message body. | |
Reads a boolean value starting from the unread portion of the QABinaryMessage instance's message body. | |
Reads a signed 8-bit value starting from the unread portion of the QABinaryMessage instance's message body. | |
Reads a character value starting from the unread portion of the QABinaryMessage instance's message body. | |
Reads a double value starting from the unread portion of the QABinaryMessage instance's message body. | |
Reads a float value starting from the unread portion of the QABinaryMessage instance's message body. | |
Reads a signed 32-bit integer value starting from the unread portion of the QABinaryMessage instance's message body. | |
Reads a signed 64-bit integer value starting from the unread portion of the QABinaryMessage instance's message body. | |
Reads a signed 16-bit value starting from the unread portion of the QABinaryMessage instance's message body. | |
Reads a string value starting from the unread portion of the QABinaryMessage instance's message body. | |
Resets a message so that the reading of values starts from the beginning of the message body. | |
Sets the destination address for this message. | |
Sets the qa_bool property with the specified name to the specified value. | |
Sets a qa_byte property with the specified name to the specified value. | |
Sets the qa_double property with the specified name to the specified value. | |
Sets the qa_float property with the specified name to the specified value. | |
Sets the In-Reply-To ID for the message. | |
Sets the qa_int property with the specified name to the specified value. | |
Sets the qa_long property with the specified name to the specified value. | |
Sets the message ID. | |
Sets the priority level for this message. | |
Sets an indication of whether this message was redelivered. | |
Sets the address to which a reply to this message should be sent. | |
Sets e qa_short property with the specified name to the specified value. | |
Sets a qa_string property with the specified name to the specified value. | |
Sets the message timestamp. | |
Appends a byte array value to the QABinaryMessage instance's message body. | |
Appends a boolean value to the QABinaryMessage instance's message body. | |
Appends a byte value to the QABinaryMessage instance's message body. | |
Appends a char value to the QABinaryMessage instance's message body. | |
Appends a double value to the QABinaryMessage instance's message body. | |
Appends a float value to the QABinaryMessage instance's message body. | |
Appends an integer value to the QABinaryMessage instance's message body. | |
Appends a long value to the QABinaryMessage instance's message body. | |
Appends a short value to the QABinaryMessage instance's message body. | |
Appends a string value to the QABinaryMessage instance's message body. | |
The default message priority. | |
The default message time-to-live value. |
It inherits from the QAMessage class and adds a bytes message body. QABinaryMessage provides a variety of methods to read from and write to the bytes message body.
When the message is first created, the body of the message is write-only. After a message has been sent, the client that sent it can retain and modify it without affecting the message that has been sent. The same message object can be sent multiple times.
When a message is received, the provider has called the QABinaryMessage::reset method so that the message body is in read-only mode and reading of values starts from the beginning of the message body. If a client attempts to write a message in read-only mode, a COMMON_MSG_NOT_WRITEABLE_ERROR is set.
The following example uses the QABinaryMessage::writeString method to write the string "Q" followed by the string "Anywhere" to a QABinaryMessage instance's message body.
// Create a binary message instance. QABinaryMessage * binary_message; binary_message = qa_manager->createBinaryMessage(); // Set optional message properties. binary_message->setReplyToAddress( "my-queue-name" ); // Write to the message body. binary_message->writeString("Q"); binary_message->writeString("Anywhere"); // Put the message in the local database, ready for sending. if( !qa_manager->putMessage( "store-id\\queue-name", msg ) ) { handleError(); } |
On the receiving end, the first QABinaryMessage::readString() invocation returns "Q" and the next QABinaryMessage::readString() invocation returns "Anywhere".
The message is sent by the QAnywhere Agent.
For more information, see Determining when message transmission should occur on the client and How to write QAnywhere client applications.
QABinaryMessage deconstructor
getBodyLength method
readBinary method
readBoolean method
readByte method
readChar method
readDouble method
readFloat method
readInt method
readLong method
readShort method
readString method
reset method
writeBinary method
writeBoolean method
writeByte method
writeChar method
writeDouble method
writeFloat method
writeInt method
writeLong method
writeShort method
writeString method
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |