A QABinaryMessage object is used to send a message containing a stream of uninterpreted bytes.
public interface QABinaryMessage
All members of QABinaryMessage interface, including all inherited members.
Name | Description |
---|---|
Clear all the properties of the message. | |
Returns the destination address for the QAMessage instance. | |
Returns the size of the message body in bytes. | |
Gets a boolean message property. | |
Gets a signed byte message property. | |
Gets a double message property. | |
Returns the message's expiration value, or null if the message does not expire or has not yet been sent. | |
Gets a float message property. | |
Returns the message ID of the message to which this message is a reply. | |
Gets an int message property. | |
Gets a long message property. | |
Returns the globally unique message ID of the message. | |
Returns the priority of the message (ranging from 0 to 9). | |
Gets a message property. | |
Gets an enumerator over the property names of the message. | |
Returns the property type of the given property. | |
Indicates whether the message has been previously received but not acknowledged. | |
Returns the reply-to address of this message. | |
Gets a short message property. | |
Gets a String message property. | |
Returns the message timestamp, which is the time the message was created. | |
Indicates whether the given property has been set for this message. | |
Reads some 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 signed byte value starting from the unread portion of a QABinaryMessage 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 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 signed byte property. | |
Sets a double property. | |
Sets a float property. | |
Sets the in reply to ID, which identifies the message this message is a reply to. | |
Sets an int property. | |
Sets a long property. | |
Sets the priority of the message (ranging from 0 to 9). | |
Sets a property. | |
Sets the reply-to address. | |
Sets a short property. | |
Sets a string property. | |
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 signed 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 time-to-live value. |
QABinaryMessage 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(String) 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. try { qa_manager.putMessage( "store-id\\queue-name", binary_message ); } catch ( QAException e ) { 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.
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 © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |