WebLogic Messaging API Class Library

IMapMessage Interface

An IMapMessage object is used to send a set of name-value pairs. The names are String objects, and the values are primitive data types. 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. IMapMessage inherits from the IMessage interface and adds a message body that contains a Map.

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 IMapMessage.SetInt("foo", 6) is equivalent to IMapMessage.SetObject("foo", (int)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 an IMapMessage, 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.

IMapMessage objects support the following conversion table. The marked cases are supported. The unmarked cases will throw a MessageException.

A value written as the row type can be read as the column type.

booleansbyteshortcharintlongfloatdoubleStringbyte[]
booleanxx
sbytexxxxx
shortxxxx
charxx
intxxx
longxx
floatxxx
doublexx
Stringxxxxxxxx
byte[]x

Attempting to read a null value as a primitive type will throw a NullPointerException.

For a list of all members of this type, see IMapMessage Members.

public interface IMapMessage : WebLogic.Messaging.IMessage

Requirements

Namespace: WebLogic.Messaging

Assembly: WebLogic.Messaging (in WebLogic.Messaging.dll)

See Also

IMapMessage Members | WebLogic.Messaging Namespace | CreateMapMessage | IBytesMessage | IMessage | IObjectMessage | IStreamMessage | ITextMessage