Collapse All Expand All

.NET Framework Class Library
Members See Also

[TIBCO.EMS .NET client library 5.1 documentation]

A MapMessage object is used to send a set of name-value pairs. The names are String objects, and the values are primitive data types in the .NET programming language. The names must have a value that is not null, and not an empty string. The entries can be accessed sequentially or randomly by name. The order of the entries is undefined. MapMessage inherits from the Message interface and adds a message body that contains a Map.

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

# Syntax

    [SerializableAttribute]
    public class MapMessage : Message, ICloneable

    <SerializableAttribute> _
    Public Class MapMessage _
    	Inherits Message _
    	Implements ICloneable

    [SerializableAttribute]
    public ref class MapMessage : public Message,
    	ICloneable

# Remarks

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 MapMessage.setInt("foo", 6) is equivalent to MapMessage.setObject("foo", new Integer(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 a client receives a MapMessage, it is in read-only mode. If a client attempts to write to the message at this point, a MessageNotWriteableException is thrown. If clearBody is called, the message can now be both read from and written to.

Extentions

TIBCO Enterprise Message Service extends the JMS MapMessage and StreamMessage body types in two ways. These extensions allow TIBCO Enterprise Message Service to exchange messages with TIBCO Rendezvous and TIBCO SmartSockets programs, which 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..::.Message
TIBCO.EMS..::.MapMessage

# See Also

MapMessage Members
TIBCO.EMS Namespace