TIBCO EMS .NET API 10.2
TIBCO EMS .NET API 10.2
|
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. More...
Public Member Functions | |
MapMessage (Session session) | |
Construct an empty map message for a session. More... | |
override Object | Clone () |
Implements the clone method from ICloneable interfacae More... | |
bool | GetBoolean (string name) |
Returns the boolean value with the specified name. More... | |
byte | GetByte (string name) |
Returns the byte value with the specified name. More... | |
short | GetShort (string name) |
Returns the short value with the specified name. More... | |
char | GetChar (string name) |
Returns the char value with the specified name. More... | |
int | GetInt (string name) |
Returns the int value with the specified name. More... | |
long | GetLong (string name) |
Returns the long value with the specified name. More... | |
float | GetFloat (string name) |
Returns the float value with the specified name. More... | |
double | GetDouble (string name) |
Returns the double value with the specified name. More... | |
string | GetString (string name) |
Returns the string value with the specified name. More... | |
byte[] | GetBytes (string name) |
Returns the byte array value with the specified name. More... | |
Object | GetObject (string name) |
Returns the object value with the specified name. More... | |
ICollection | GetMapNames () |
Returns a collection of all the names in the MapMessage object. More... | |
void | SetBoolean (string name, bool value) |
Sets a boolean value with the specified name into the Map. More... | |
void | SetByte (string name, byte value) |
Sets a byte value with the specified name into the Map. More... | |
void | SetShort (string name, short value) |
Sets a short value with the specified name into the Map. More... | |
void | SetChar (string name, char value) |
Sets a char value with the specified name into the Map. More... | |
void | SetInt (string name, int value) |
Sets an int value with the specified name into the Map. More... | |
void | SetLong (string name, long value) |
Sets a long value with the specified name into the Map. More... | |
void | SetFloat (string name, float value) |
Sets a float value with the specified name into the Map. More... | |
void | SetDouble (string name, double value) |
Sets a double value with the specified name into the Map. More... | |
void | SetString (string name, String value) |
Sets a string value with the specified name into the Map. More... | |
void | SetBytes (string name, byte[] value) |
Sets a byte array value with the specified name into the Map. More... | |
void | SetBytes (string name, byte[] value, int offset, int length) |
Sets a portion of the byte array value with the specified name into the Map. More... | |
void | SetObject (string name, Object value) |
Sets an object value with the specified name into the Map. More... | |
bool | ItemExists (string name) |
Indicates whether an item exists in this MapMessage object. More... | |
override void | ClearBody () |
Clears out the message body. Clearing a message's body does not clear its header values or property entries. More... | |
override string | ToString () |
returns a string representation of the message More... | |
Properties | |
int | FieldCount [get] |
Returns number of fields that this message holds. More... | |
IEnumerator | MapNames [get] |
Returns an Enumeration of all the names in the MapMessage object. More... | |
Additional Inherited Members |
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.
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 Jakarta Messaging MapMessage and StreamMessage body types in two ways. These extensions allow TIBCO Enterprise Message Service to exchange messages with TIBCO Rendezvous programs, which have certain features not available within the Jakarta Messaging specification.
These extensions add considerable flexibility to the two body types. However, they are extensions and therefore not compliant with Jakarta Messaging specifications. Extended messages are tagged as extensions with the vendor property tag JMS_TIBCO_MSG_EXT.
|
inline |
Construct an empty map message for a session.
session | The session of the message. |
|
inlinevirtual |
Clears out the message body. Clearing a message's body does not clear its header values or property entries.
If this message body was read-only, calling this method leaves the message body in the same state as an empty body in a newly created message.
Reimplemented from TIBCO.EMS.Message.
|
inlinevirtual |
Implements the clone method from ICloneable interfacae
Makes a clone of the message.
Reimplemented from TIBCO.EMS.Message.
|
inline |
Returns the boolean value with the specified name.
name | the name of the boolean |
EMSException | if the message could not be read due to an internal error |
MessageFormatException | if this type conversion is invalid. |
|
inline |
Returns the byte value with the specified name.
name | the name of the byte |
EMSException | if the message could not be read due to an internal error |
MessageFormatException | if this type conversion is invalid. |
|
inline |
Returns the byte array value with the specified name.
name | the name of the byte array |
EMSException | if the message could not be read due to an internal error |
MessageFormatException | if this type conversion is invalid. |
|
inline |
Returns the char value with the specified name.
name | the name of the char |
EMSException | if the message could not be read due to an internal error |
MessageFormatException | if this type conversion is invalid. |
|
inline |
Returns the double value with the specified name.
name | the name of the double |
EMSException | if the message could not be read due to an internal error |
MessageFormatException | if this type conversion is invalid. |
|
inline |
Returns the float value with the specified name.
name | the name of the float |
EMSException | if the message could not be read due to an internal error |
MessageFormatException | if this type conversion is invalid. |
|
inline |
Returns the int value with the specified name.
name | the name of the int |
EMSException | if the message could not be read due to an internal error |
MessageFormatException | if this type conversion is invalid. |
|
inline |
Returns the long value with the specified name.
name | the name of the long |
EMSException | if the message could not be read due to an internal error |
MessageFormatException | if this type conversion is invalid. |
|
inline |
Returns a collection of all the names in the MapMessage object.
Programs can get a collection of the names of all the data items in the message body.
|
inline |
Returns the object value with the specified name.
name | the name of the object |
EMSException | if the message could not be read due to an internal error |
MessageFormatException | if this type conversion is invalid. |
|
inline |
Returns the short value with the specified name.
name | the name of the short |
EMSException | if the message could not be read due to an internal error |
MessageFormatException | if this type conversion is invalid. |
|
inline |
Returns the string value with the specified name.
name | the name of the string |
EMSException | if the message could not be read due to an internal error |
MessageFormatException | if this type conversion is invalid. |
|
inline |
Indicates whether an item exists in this MapMessage object.
name | the name of the item to test |
|
inline |
Sets a boolean value with the specified name into the Map.
name | The name of the boolean. Name cannot be null or an empty string. |
value | The boolean value to set in the Map |
MessageNotWriteableException | A MessageNotWriteableException may be thrown if the message is in read-only mode |
ArgumentException | An ArgumentException may be thrown if the name is null or if the name is an empty string |
|
inline |
Sets a byte value with the specified name into the Map.
name | The name of the byte. Name cannot be null or an empty string. |
value | The byte value to set in the Map |
MessageNotWriteableException | A MessageNotWriteableException may be thrown if the message is in read-only mode |
ArgumentException | An ArgumentException may be thrown if the name is null or if the name is an empty string |
|
inline |
Sets a byte array value with the specified name into the Map.
name | The name of the byte array. |
value | The byte array value to set in the Map |
MessageNotWriteableException | A MessageNotWriteableException may be thrown if the message is in read-only mode |
ArgumentException | An ArgumentException may be thrown if the name is null or if the name is an empty string |
|
inline |
Sets a portion of the byte array value with the specified name into the Map.
name | The name of the boolean. |
value | The byte array value to set in the Map |
offset | the initial offset within the byte array |
length | the number of bytes to use |
This method extracts the specified bytes and uses them as the value; otherwise it uses the entire byte array. The offset and length arguments must be between zero and value.length (inclusive) and their sum must also fall within the same range. That is, these two arguments must specify a span of bytes within the value argument. Otherwise, this method throws an System.IndexOutOfRangeException and does not set any value.
MessageNotWriteableException | A MessageNotWriteableException may be thrown if the message is in read-only mode |
ArgumentException | An ArgumentException may be thrown if value is null |
IndexOutOfRangeException | An IndexOutOfRangeException may be thrown if the offset and length arguments do not specify a span of bytes within the array specified by the value argument. |
|
inline |
Sets a char value with the specified name into the Map.
name | The name of the char. Name cannot be null or an empty string. |
value | The char value to set in the Map |
MessageNotWriteableException | A MessageNotWriteableException may be thrown if the message is in read-only mode |
ArgumentException | An ArgumentException may be thrown if the name is null or if the name is an empty string |
|
inline |
Sets a double value with the specified name into the Map.
name | The name of the double. Name cannot be null or an empty string. |
value | The double value to set in the Map |
MessageNotWriteableException | A MessageNotWriteableException may be thrown if the message is in read-only mode |
ArgumentException | An ArgumentException may be thrown if the name is null or if the name is an empty string |
|
inline |
Sets a float value with the specified name into the Map.
name | The name of the float. Name cannot be null or an empty string. |
value | The float value to set in the Map |
MessageNotWriteableException | A MessageNotWriteableException may be thrown if the message is in read-only mode |
ArgumentException | An ArgumentException may be thrown if the name is null or if the name is an empty string |
|
inline |
Sets an int value with the specified name into the Map.
name | The name of the int. Name cannot be null or an empty string. |
value | The int value to set in the Map |
MessageNotWriteableException | A MessageNotWriteableException may be thrown if the message is in read-only mode |
ArgumentException | An ArgumentException may be thrown if the name is null or if the name is an empty string |
|
inline |
Sets a long value with the specified name into the Map.
name | The name of the long. Name cannot be null or an empty string. |
value | The long value to set in the Map |
MessageNotWriteableException | A MessageNotWriteableException may be thrown if the message is in read-only mode |
ArgumentException | An ArgumentException may be thrown if the name is null or if the name is an empty string |
|
inline |
Sets an object value with the specified name into the Map.
name | The name of the object. Name cannot be null or an empty string. |
value | The object value to set in the Map |
MessageNotWriteableException | A MessageNotWriteableException may be thrown if the message is in read-only mode |
ArgumentException | An ArgumentException may be thrown if the name is null or if the name is an empty string |
|
inline |
Sets a short value with the specified name into the Map.
name | The name of the short. Name cannot be null or an empty string. |
value | The short value to set in the Map |
MessageNotWriteableException | A MessageNotWriteableException may be thrown if the message is in read-only mode |
ArgumentException | An ArgumentException may be thrown if the name is null or if the name is an empty string |
|
inline |
Sets a string value with the specified name into the Map.
name | The name of the string |
value | The string value to set in the Map |
MessageNotWriteableException | A MessageNotWriteableException may be thrown if the message is in read-only mode |
ArgumentException | An ArgumentException may be thrown if the name is null or if the name is an empty string |
|
inline |
returns a string representation of the message
|
get |
Returns number of fields that this message holds.
Programs cannot set this property.
|
get |
Returns an Enumeration of all the names in the MapMessage object.
Programs can get an enumerator that produces the names of all the data items in the message body.