| Package | com.kaazing.gateway.jms.client |
| Interface | public interface MapMessage extends Message |
MapMessage object is used to send a set of name-value pairs.
The names are String objects, and the values are data of following
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.
MapMessage inherits from the Message 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 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.
MapMessage objects support the following conversion table.
The marked cases must be supported. The unmarked cases must throw a
JMSException. The String-to-primitive conversions
may throw a runtime exception if the primitive's valueOf()
method does not accept it as a valid String representation of
the primitive.
A value written as the row type can be read as the column type.
| | boolean byte short char int long float double String byte[] |---------------------------------------------------------------------- |boolean | X X |byte | X X X X X |short | X X X X |char | X X |int | X X X |long | X X |float | X X X |double | X X |String | X X X X X X X X |byte[] | X |----------------------------------------------------------------------
Attempting to read a null value as a primitive type must be treated
as calling the primitive's corresponding valueOf(String)
conversion method with a null value. Since char does not
support a String conversion, attempting to read a null value
as a char must throw a NullPointerException.
See also
| Method | Defined by | ||
|---|---|---|---|
![]() |
acknowledge():void
Acknowledges all consumed messages of the session of this consumed
message.
| Message | |
![]() |
clearBody():void
Clears out the message body.
| Message | |
![]() |
clearProperties():void
Clears a message's properties.
| Message | |
|
getBoolean(name:String):Boolean
Returns the
boolean value with the specified name. | MapMessage | ||
![]() |
getBooleanProperty(name:String):Boolean
Returns the value of the
boolean property with the
specified name. | Message | |
|
getByte(name:String):int
Returns the 8-bit integer value with the specified name.
| MapMessage | ||
![]() |
getByteProperty(name:String):int
Returns the value of the
byte property with the specified
name. | Message | |
|
getBytes(name:String):ByteArray
Returns the
ByteArray value with the specified name. | MapMessage | ||
|
getChar(name:String):String
Returns the
String representing Unicode character value with the specified name. | MapMessage | ||
|
getDouble(name:String):Number
Returns the
Number value with the specified name. | MapMessage | ||
![]() |
getDoubleProperty(name:String):Number
Returns the value of the
double property with the specified
name. | Message | |
|
getFloat(name:String):Number
Returns the
Number value with the specified name. | MapMessage | ||
![]() |
getFloatProperty(name:String):Number
Returns the value of the
float property with the specified
name. | Message | |
|
getInt(name:String):int
Returns the
int value with the specified name. | MapMessage | ||
![]() |
getIntProperty(name:String):int
Returns the value of the
int property with the specified
name. | Message | |
|
getLong(name:String):Number
Returns the
Number value with the specified name. | MapMessage | ||
![]() |
getLongProperty(name:String):Number
Returns the value of the
long property with the specified
name. | Message | |
|
getMapNames():Array
Returns an
Array of all the names in the
MapMessage object. | MapMessage | ||
|
getObject(name:String):Object
Returns the value of the object with the specified name.
| MapMessage | ||
![]() |
getObjectProperty(name:String):Object
Returns the value of the object property with the specified name.
| Message | |
![]() |
getPropertyNames():Array
Returns an
Enumeration of all the property names. | Message | |
|
getShort(name:String):int
Returns the 16-bit
int value with the specified name. | MapMessage | ||
![]() |
getShortProperty(name:String):int
Returns the value of the
short property with the specified
name. | Message | |
|
getString(name:String):String
Returns the
String value with the specified name. | MapMessage | ||
![]() |
getStringProperty(name:String):String
Returns the value of the
String property with the specified
name. | Message | |
|
itemExists(name:String):Boolean
Indicates whether an item exists in this
MapMessage object. | MapMessage | ||
![]() |
propertyExists(name:String):Boolean
Indicates whether a property value exists.
| Message | |
|
setBoolean(name:String, value:Boolean):void
Sets a
boolean value with the specified name into the Map. | MapMessage | ||
![]() |
setBooleanProperty(name:String, value:Boolean):void
Sets a
boolean property value with the specified name into
the message. | Message | |
|
setByte(name:String, value:int):void
Sets a 8-bit
int value with the specified name into the Map. | MapMessage | ||
![]() |
setByteProperty(name:String, value:int):void
Sets a
byte property value with the specified name into
the message. | Message | |
|
setBytes(name:String, value:ByteArray, offset:int = 0, length:int = 0):void
Sets a portion of the byte array value with the specified name into the
Map.
| MapMessage | ||
|
setChar(name:String, value:String):void
Sets Unicode character value with the specified name into the Map.
| MapMessage | ||
|
setDouble(name:String, value:Number):void
Sets a
Number as double value with the specified name into the Map. | MapMessage | ||
![]() |
setDoubleProperty(name:String, value:Number):void
Sets a
double property value with the specified name into
the message. | Message | |
|
setFloat(name:String, value:Number):void
Sets a
Number as float value with the specified name into the Map. | MapMessage | ||
![]() |
setFloatProperty(name:String, value:Number):void
Sets a
float property value with the specified name into
the message. | Message | |
|
setInt(name:String, value:int):void
Sets an
int value with the specified name into the Map. | MapMessage | ||
![]() |
setIntProperty(name:String, value:int):void
Sets an
int property value with the specified name into
the message. | Message | |
|
setLong(name:String, value:Number):void
Sets a
long value with the specified name into the Map. | MapMessage | ||
![]() |
setLongProperty(name:String, value:Number):void
Sets a
long property value with the specified name into
the message. | Message | |
|
setObject(name:String, value:Object):void
Sets an object value with the specified name into the Map.
| MapMessage | ||
![]() |
setObjectProperty(name:String, value:Object):void
Sets a object property value with the specified name into the
message.
| Message | |
|
setShort(name:String, value:int):void
Sets a 16-bit
int value with the specified name into the Map. | MapMessage | ||
![]() |
setShortProperty(name:String, value:int):void
Sets a
short property value with the specified name into
the message. | Message | |
|
setString(name:String, value:String):void
Sets a
String value with the specified name into the Map. | MapMessage | ||
![]() |
setStringProperty(name:String, value:String):void
Sets a
String property value with the specified name into
the message. | Message | |
| getBoolean | () | method |
public function getBoolean(name:String):Boolean Returns the boolean value with the specified name.
name:String — the name of the boolean
|
Boolean — the boolean value with the specified name
|
| getByte | () | method |
public function getByte(name:String):intReturns the 8-bit integer value with the specified name.
Parametersname:String — the name of the value
|
int — the 8-bit int value with the specified name
|
| getBytes | () | method |
public function getBytes(name:String):ByteArray Returns the ByteArray value with the specified name.
name:String — the name of the byte array
|
ByteArray — a copy of the byte array value with the specified name; if there
is no item by this name, a null value is returned.
|
| getChar | () | method |
public function getChar(name:String):String Returns the String representing Unicode character value with the specified name.
name:String — the name of the Unicode character
|
String — the Unicode character value with the specified name
|
| getDouble | () | method |
public function getDouble(name:String):Number Returns the Number value with the specified name.
name:String — the name of the double value
|
Number — the Number value with the specified name
|
| getFloat | () | method |
public function getFloat(name:String):Number Returns the Number value with the specified name.
name:String — the name of the float value
|
Number — the Number value with the specified name
|
| getInt | () | method |
public function getInt(name:String):int Returns the int value with the specified name.
name:String — the name of the int
|
int — the int value with the specified name
|
| getLong | () | method |
public function getLong(name:String):Number Returns the Number value with the specified name.
name:String — the name of the long value
|
Number — the Number value with the specified name
|
| getMapNames | () | method |
public function getMapNames():Array Returns an Array of all the names in the
MapMessage object.
Array — an enumeration of all the names in this MapMessage
|
| getObject | () | method |
public function getObject(name:String):ObjectReturns the value of the object with the specified name.
This method can be used to return, in objectified format,
an object in the Action Script language that had
been stored in the Map with the equivalent
setObject method call, or its equivalent primitive
settype method.
Note that bytes are returned as ByteArray
Note that float/double/long value is returned as Number
Note that short/byte value is returned as int
name:String — the name of the object
|
Object — Object with the specified name.
|
| getShort | () | method |
public function getShort(name:String):int Returns the 16-bit int value with the specified name.
name:String — the name of the short
|
int — the short value with the specified name
|
| getString | () | method |
public function getString(name:String):String Returns the String value with the specified name.
name:String — the name of the String
|
String — the String value with the specified name; if there
is no item by this name, a null value is returned
|
| itemExists | () | method |
public function itemExists(name:String):Boolean Indicates whether an item exists in this MapMessage object.
name:String — the name of the item to test
|
Boolean — true if the item exists
|
| setBoolean | () | method |
public function setBoolean(name:String, value:Boolean):void Sets a boolean value with the specified name into the Map.
name:String — the name of the boolean
|
|
value:Boolean — the boolean value to set in the Map
|
| setByte | () | method |
public function setByte(name:String, value:int):void Sets a 8-bit int value with the specified name into the Map.
name:String — the name of the byte
|
|
value:int — the 8-bit int value to set in the Map
|
| setBytes | () | method |
public function setBytes(name:String, value:ByteArray, offset:int = 0, length:int = 0):voidSets a portion of the byte array value with the specified name into the Map.
Parametersname:String — the name of the byte array
|
|
value:ByteArray — the byte array value to set in the Map
|
|
offset:int (default = 0) — the initial offset within the byte array
|
|
length:int (default = 0) — the number of bytes to use
|
| setChar | () | method |
public function setChar(name:String, value:String):voidSets Unicode character value with the specified name into the Map.
Parametersname:String — the name of the Unicode character
|
|
value:String — the Unicode character value to set in the Map
|
| setDouble | () | method |
public function setDouble(name:String, value:Number):void Sets a Number as double value with the specified name into the Map.
name:String — the name of the double value
|
|
value:Number — the double value to set in the Map
|
| setFloat | () | method |
public function setFloat(name:String, value:Number):void Sets a Number as float value with the specified name into the Map.
name:String — the name of the float value
|
|
value:Number — the float value to set in the Map
|
| setInt | () | method |
public function setInt(name:String, value:int):void Sets an int value with the specified name into the Map.
name:String — the name of the int
|
|
value:int — the int value to set in the Map
|
| setLong | () | method |
public function setLong(name:String, value:Number):void Sets a long value with the specified name into the Map.
Note that actionscript does not support 64 bit integer.
The maximum integer value supported is 53 bits long as a Number
name:String — the name of the long value
|
|
value:Number — the long value value to set in the Map
|
| setObject | () | method |
public function setObject(name:String, value:Object):voidSets an object value with the specified name into the Map. (Not supported.)
This method works only for the object types String, Boolean,
and Byte Array
name:String — the name of the Java object
|
|
value:Object — the Java object value to set in the Map
|
| setShort | () | method |
public function setShort(name:String, value:int):void Sets a 16-bit int value with the specified name into the Map.
name:String — the name of the short
|
|
value:int — the 16-bit int value to set in the Map
|
| setString | () | method |
public function setString(name:String, value:String):void Sets a String value with the specified name into the Map.
name:String — the name of the String
|
|
value:String — the String value to set in the Map
|