The IStreamMessage type exposes the following members.

Methods

  NameDescription
Public methodAcknowledge
Acknowledges all consumed messages of the session of this consumed message.

All consumed JMS messages support the acknowledge method for use when a client has specified that its JMS session's consumed messages are to be explicitly acknowledged. By invoking acknowledge on a consumed message, a client acknowledges all messages consumed by the session that the message was delivered to.

Calls to acknowledge are ignored for both transacted sessions and sessions specified to use implicit acknowledgement modes.

A client may individually acknowledge each message as it is consumed, or it may choose to acknowledge messages as an application-defined group (which is done by calling acknowledge on the last received message of the group, thereby acknowledging all messages consumed by the session.)

Messages that have been received but not acknowledged may be redelivered.

(Inherited from IMessage.)
Public methodClearBody
Clears out the message body. Clearing a message's body does not clear its header values or property entries.

If this message body was read-only, calling this method leaves the message body in the same state as an empty body in a newly created message.

(Inherited from IMessage.)
Public methodClearProperties
Clears a message's properties.

The message's header fields and body are not cleared.

(Inherited from IMessage.)
Public methodGetBooleanProperty
Returns the value of the boolean property with the specified name.
(Inherited from IMessage.)
Public methodGetByteProperty
Returns the value of the byte property with the specified name.
(Inherited from IMessage.)
Public methodGetDoubleProperty
Returns the value of the double property with the specified name.
(Inherited from IMessage.)
Public methodGetFloatProperty
Returns the value of the float property with the specified name.
(Inherited from IMessage.)
Public methodGetIntProperty
Returns the value of the int property with the specified name.
(Inherited from IMessage.)
Public methodGetLongProperty
Returns the value of the long property with the specified name.
(Inherited from IMessage.)
Public methodGetObjectProperty
Returns the value of the object property with the specified name.

This method can be used to return, in objectified format, an object that has been stored as a property in the message with the equivalent SetObjectProperty method call, or its equivalent primitive SettypeProperty method.

(Inherited from IMessage.)
Public methodGetShortProperty
Returns the value of the short property with the specified name.
(Inherited from IMessage.)
Public methodGetStringProperty
Returns the value of the String property with the specified name.
(Inherited from IMessage.)
Public methodPropertyExists
Indicates whether a property value exists.
(Inherited from IMessage.)
Public methodReadBoolean
Reads a boolean from the stream message.
Public methodReadByte
Reads a byte value from the stream message.
Public methodReadBytes
Reads a byte array field from the stream message into the specified byte[] object (the read buffer).

To read the field value, readBytes should be successively called until it returns a value less than the length of the read buffer. The value of the bytes in the buffer following the last byte read is undefined.

If readBytes returns a value equal to the length of the buffer, a subsequent readBytes call must be made. If there are no more bytes to be read, this call returns -1.

If the byte array field value is null, readBytes returns -1.

If the byte array field value is empty, readBytes returns 0.

Once the first readBytes call on a byte[] field value has been made, the full value of the field must be read before it is valid to read the next field. An attempt to read the next field before that has been done will throw a MessageFormatException.

To read the byte field value into a new byte[] object, use the readObject method.

Public methodReadChar
Reads a Unicode character value from the stream message.
Public methodReadDouble
Reads a double from the stream message.
Public methodReadFloat
Reads a float from the stream message.
Public methodReadInt
Reads a 32-bit integer from the stream message.
Public methodReadLong
Reads a 64-bit integer from the stream message.
Public methodReadObject
Reads an object from the stream message.

This method can be used to return, in objectified format, an object that has been written to the stream with the equivalent writeObject method call, or its equivalent primitive writetype method.

Note that byte values are returned as byte[], not Byte[].

An attempt to call readObject to read a byte field value into a new byte[] object before the full value of the byte field has been read will throw a MessageFormatException.

Public methodReadShort
Reads a 16-bit integer from the stream message.
Public methodReadString
Reads a String from the stream message.
Public methodReset
Puts the message body in read-only mode and repositions the stream to the beginning.
Public methodSetBooleanProperty
Sets a boolean property value with the specified name into the message.
(Inherited from IMessage.)
Public methodSetByteProperty
Sets a byte property value with the specified name into the message.
(Inherited from IMessage.)
Public methodSetDoubleProperty
Sets a double property value with the specified name into the message.
(Inherited from IMessage.)
Public methodSetFloatProperty
Sets a float property value with the specified name into the message.
(Inherited from IMessage.)
Public methodSetIntProperty
Sets an int property value with the specified name into the message.
(Inherited from IMessage.)
Public methodSetLongProperty
Sets a long property value with the specified name into the message.
(Inherited from IMessage.)
Public methodSetObjectProperty
Sets a object property value with the specified name into the message.

Note that this method works only for the objectified primitive object types (Integer, Double, Long ...) and String objects.

(Inherited from IMessage.)
Public methodSetShortProperty
Sets a short property value with the specified name into the message.
(Inherited from IMessage.)
Public methodSetStringProperty
Sets a String property value with the specified name into the message.
(Inherited from IMessage.)
Public methodWriteBoolean
Writes a boolean to the stream message. The value true is written as the value (byte)1; the value false is written as the value (byte)0.
Public methodWriteByte
Writes a byte to the stream message.
Public methodWriteBytes(array<Byte>[]()[][])
Writes a byte array field to the stream message.

The byte array value is written to the message as a byte array field. Consecutively written byte array fields are treated as two distinct fields when the fields are read.

Public methodWriteBytes(array<Byte>[]()[][], Int32, Int32)
Writes a portion of a byte array as a byte array field to the stream message.

The a portion of the byte array value is written to the message as a byte array field. Consecutively written byte array fields are treated as two distinct fields when the fields are read.

Public methodWriteChar
Writes a char to the stream message.
Public methodWriteDouble
Writes a double to the stream message.
Public methodWriteFloat
Writes a float to the stream message.
Public methodWriteInt
Writes an int to the stream message.
Public methodWriteLong
Writes a long to the stream message.
Public methodWriteObject
Writes an object to the stream message.

This method works only for the objectified primitive object types (Integer, Double, Long...), String objects, and byte arrays.

Public methodWriteShort
Writes a short to the stream message.
Public methodWriteString
Writes a String to the stream message.

See Also