An QABinaryMessage object is used to send a message containing a stream of uninterpreted bytes.
Public Interface QABinaryMessage Inherits QAMessage
public interface QABinaryMessage : QAMessage
All members of QABinaryMessage interface, including all inherited members.
Name | Description |
---|---|
Clears the body of the message. | |
Clears all the properties of the message. | |
Gets a boolean message property. | |
Gets a byte message property. | |
Gets a double message property. | |
Gets a float message property. | |
Gets an int message property. | |
Gets a long message property. | |
Gets a message property. | |
Gets an enumerator over the property names of the message. | |
Returns the property type of the given property. | |
Gets a signed byte message property. | |
Gets a short message property. | |
Gets a string message property. | |
Indicates whether the given property has been set for this message. | |
Reads up to length number of bytes starting from the unread portion of a QABinaryMessage instance body and stores them into the array dest. | |
Reads a boolean value starting from the unread portion of the QABinaryMessage instance's message body. | |
Reads a char value starting from the unread portion of a QABinaryMessage message body. | |
Reads a double value starting from the unread portion of a QABinaryMessage message body. | |
Reads a float value starting from the unread portion of a QABinaryMessage message body. | |
Reads an integer value starting from the unread portion of a QABinaryMessage message body. | |
Reads a long value starting from the unread portion of a QABinaryMessage message body. | |
Reads a signed byte value starting from the unread portion of a QABinaryMessage message body. | |
Reads a short value starting from the unread portion of a QABinaryMessage message body. | |
Reads a string value starting from the unread portion of a QABinaryMessage message body. | |
Resets a message so that the reading of values starts from the beginning of the message body. | |
Sets a boolean property. | |
Sets a byte property. | |
Sets a double property. | |
Sets a float property. | |
Sets an int property. | |
Sets a long property. | |
Sets a property. | |
Sets a signed byte property. | |
Sets a short property. | |
Sets a string property. | |
Appends length bytes from a byte array starting at the given offset to the QABinaryMessage instance's message body. | |
Appends a boolean 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 signed byte 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 destination address for the QAMessage instance. | |
Returns the size of the message body in bytes. | |
Gets the message's expiration value. | |
The message id of the message for which this message is a reply. | |
The globally unique message id of the message. | |
The priority of the message (ranging from 0 to 9). | |
Indicates whether the message has been previously received but not acknowledged. | |
The reply to address of this message. | |
The message timestamp. |
It inherits from the QAMessage class and adds a bytes message body. QABinaryMessage provides a variety of functions to read from and write to the bytes message body.
When the message is first created, the body of the message is in write-only mode. 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 QABinaryMessage.Reset() so that the message body is in read-only mode and reading of values starts from the beginning of the message body.
The following example uses the QABinaryMessage writeString function to write the string "Q" followed by the string "Anywhere" to a QABinaryMessage instances message body.
// create a binary message instance QABinaryMessage binary_message; binary_message = qa_manager.CreateBinaryMessage(); // set optional message properties ... binary_message.ReplyToAddress = "my-queue-name"; // write to the message body binary_message->WriteString("Q"); binary_messge->WriteString("Anywhere"); // put the message in the local database, ready for sending if(!qa_manager->putMessage( "store-id\\queue-name", msg )) { handleError(); } |
The message is sent by the QAnywhere Agent. On the receiving end, the first QABinaryMessage.ReadString invocation returns "Q", and the next QABinaryMessage.ReadString invocation returns "Anywhere".
For more information, see Determining when message transmission should occur on the client and Writing QAnywhere client applications.
ReadBinary method
ReadBoolean method
ReadChar method
ReadDouble method
ReadFloat method
ReadInt method
ReadLong method
ReadSbyte method
ReadShort method
ReadString method
Reset method
WriteBinary method
WriteBoolean method
WriteChar method
WriteDouble method
WriteFloat method
WriteInt method
WriteLong method
WriteSbyte method
WriteShort method
WriteString method
BodyLength property
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |