MapMessage object is used to send a set of name-value pairs.
More...
#include <javax_jms_MapMessage.h>
Inheritance diagram for javax::jms::MapMessage:


Public Types | |
| enum | { xmogDefaultFlags = xmog_base::GLOBAL, xmogMajorVersion = 3, xmogMinorVersion = 2, xmogPatchVersion = 9, xmogBuildNumber = 2047 } |
|
typedef ::xmog_java_array_template< ::javax::jms::MapMessage > | array1D |
|
typedef ::xmog_java_array_template< ::xmog_java_array_template< ::javax::jms::MapMessage > > | array2D |
Public Member Functions | |
| virtual bool | getBoolean (const ::java::lang::String &name,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the boolean value with the specified name. | |
| virtual jbyte | getByte (const ::java::lang::String &name,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the byte value with the specified name. | |
| virtual ::xmog_java_byte_array | getBytes (const ::java::lang::String &name,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Returns the byte array value with the specified name. | |
| virtual jchar | getChar (const ::java::lang::String &name,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Returns the Unicode character value with the specified name. | |
| virtual jdouble | getDouble (const ::java::lang::String &name,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the double value with the specified name. | |
| virtual jfloat | getFloat (const ::java::lang::String &name,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the float value with the specified name. | |
| virtual jint | getInt (const ::java::lang::String &name,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the int value with the specified name. | |
| virtual jlong | getLong (const ::java::lang::String &name,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the long value with the specified name. | |
| virtual ::java::util::Enumeration | getMapNames (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns an Enumeration of all the names in the MapMessage object. | |
| virtual ::java::lang::Object | getObject (const ::java::lang::String &name,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Returns the value of the object with the specified name. | |
| virtual jshort | getShort (const ::java::lang::String &name,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the short value with the specified name. | |
| virtual ::java::lang::String | getString (const ::java::lang::String &name,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the String value with the specified name. | |
| virtual bool | itemExists (const ::java::lang::String &name,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Indicates whether an item exists in this MapMessage object. | |
| virtual void | setBoolean (const ::java::lang::String &name, bool value,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Sets a boolean value with the specified name into the Map. | |
| virtual void | setByte (const ::java::lang::String &name, jbyte value,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Sets a byte value with the specified name into the Map. | |
| virtual void | setBytes (const ::java::lang::String &name, const ::xmog_java_byte_array &value, jint offset, jint length,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Sets a portion of the byte array value with the specified name into the Map. | |
| virtual void | setBytes (const ::java::lang::String &name, const ::xmog_java_byte_array &value,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Sets a byte array value with the specified name into the Map. | |
| virtual void | setChar (const ::java::lang::String &name, jchar value,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Sets a Unicode character value with the specified name into the Map. | |
| virtual void | setDouble (const ::java::lang::String &name, jdouble value,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Sets a double value with the specified name into the Map. | |
| virtual void | setFloat (const ::java::lang::String &name, jfloat value,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Sets a float value with the specified name into the Map. | |
| virtual void | setInt (const ::java::lang::String &name, jint value,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Sets an int value with the specified name into the Map. | |
| virtual void | setLong (const ::java::lang::String &name, jlong value,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Sets a long value with the specified name into the Map. | |
| virtual void | setObject (const ::java::lang::String &name, const ::java::lang::Object &value,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Sets an object value with the specified name into the Map. | |
| virtual void | setShort (const ::java::lang::String &name, jshort value,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Sets a short value with the specified name into the Map. | |
| virtual void | setString (const ::java::lang::String &name, const ::java::lang::String &value,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Sets a String value with the specified name into the Map. | |
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 Java 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.
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.
Rich Burridge
|
||||||||||||||||
|
Returns the
|
|
||||||||||||||||
|
Returns the
|
|
||||||||||||||||
|
Returns the byte array value with the specified name.
|
|
||||||||||||||||
|
Returns the Unicode character value with the specified name.
|
|
||||||||||||||||
|
Returns the
|
|
||||||||||||||||
|
Returns the
|
|
||||||||||||||||
|
Returns the
|
|
||||||||||||||||
|
Returns the
|
|
||||||||||||
|
Returns an
|
|
||||||||||||||||
|
Returns the value of the object with the specified name.
This method can be used to return, in objectified format, an object in the Java programming language ("Java object") that had been stored in the Map with the equivalent
Note that byte values are returned as
|
|
||||||||||||||||
|
Returns the
|
|
||||||||||||||||
|
Returns the
|
|
||||||||||||||||
|
Indicates whether an item exists in this
|
|
||||||||||||||||||||
|
Sets a
|
|
||||||||||||||||||||
|
Sets a
|
|
||||||||||||||||||||||||||||
|
Sets a portion of the byte array value with the specified name into the Map.
|
|
||||||||||||||||||||
|
Sets a byte array value with the specified name into the Map.
|
|
||||||||||||||||||||
|
Sets a Unicode character value with the specified name into the Map.
|
|
||||||||||||||||||||
|
Sets a
|
|
||||||||||||||||||||
|
Sets a
|
|
||||||||||||||||||||
|
Sets an
|
|
||||||||||||||||||||
|
Sets a
|
|
||||||||||||||||||||
|
Sets an object value with the specified name into the Map.
This method works only for the objectified primitive object types (
|
|
||||||||||||||||||||
|
Sets a
|
|
||||||||||||||||||||
|
Sets a
|
1.4.1