Collapse All Expand All

.NET Framework Class Library
Members See Also

[TIBCO.EMS.UFOCLIENT .NET client library 6.0 documentation]

A StreamMessage object is used to send a stream of primitive types in the .NET programming language. It is filled and read sequentially. It inherits from the Message interface and adds a stream message body.

Namespace: TIBCO.EMS.UFO
Assembly: TIBCO.EMS.UFO (in TIBCO.EMS.UFO.dll)

# Syntax

    [SerializableAttribute]
    public class StreamMessage : Message

    <SerializableAttribute> _
    Public Class StreamMessage _
    	Inherits Message

    [SerializableAttribute]
    public ref class StreamMessage : public Message

# Remarks

Each datum in the stream must be a primitive type, or an object representation of a primitive type.

The primitive types can be read or written explicitly using methods for each type. They may also be read or written generically as objects. For instance, a call to StreamMessage.writeInt(6) is equivalent to StreamMessage.writeObject((object)6). Both forms are provided, because the explicit form is convenient for static programming, and the object form is needed when types are not known at compile time.

When the message is first created, and when clearBody is called, the body of the message is in write-only mode. After the first call to reset has been made, the message body is in read-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 has been received, the provider has called reset so that the message body is in read-only mode for the client.

If clearBody is called on a message in read-only mode, the message body is cleared and the message body is in write-only mode.

If a client attempts to read a message in write-only mode, a MessageNotReadableException is thrown.

If a client attempts to write a message in read-only mode, a MessageNotWriteableException is thrown.

Extensions

TIBCO Enterprise Message Service extends the MapMessage and StreamMessage body types in two ways. These extensions allow TIBCO Enterprise Message Service to exchange messages with TIBCO Rendezvous and ActiveEnterprise formats that have certain features not available within the JMS specification.

- You can insert another MapMessage or StreamMessage instance as a submessage into a MapMessage or StreamMessage, generating a series of nested messages, instead of a flat message.
- You can use arrays as well as primitive types for the values.

These extensions add considerable flexibility to the two body types. However, they are extensions and therefore not compliant with JMS specifications. Extended messages are tagged as extensions with the vendor property tag JMS_TIBCO_MSG_EXT.

# Inheritance Hierarchy

System..::.Object
TIBCO.EMS.UFO..::.Message
TIBCO.EMS.UFO..::.StreamMessage

# See Also

StreamMessage Members
TIBCO.EMS.UFO Namespace