IMapMessage

A map message is a message whose body comprises a set of name-value pairs, where each value has an associated data type.

When an application gets the value of name-value pair, the value can be converted by XMS into another data type. For more information about this form of implicit conversion, see the information about map messages in The body of an XMS message.

Parent topic: .NET interfaces


.NET properties

    Summary of .NET properties:

    .NET property Description
    MapNames Get an enumeration of the names in the body of the map message.


MapNames - Get Map Names

    Interface:
    System.Collections.IEnumerator MapNames
    {
      get;
    }
    

Get an enumeration of the names in the body of the map message.

    Exceptions:

    • XMSException


Methods

    Summary of methods:

    Method Description
    GetBoolean Get the boolean value identified by name from the body of the map message.
    GetByte Get the byte identified by name from the body of the map message.
    GetBytes Get the array of bytes identified by name from the body of the map message.
    GetChar Get the character identified by name from the body of the map message.
    GetDouble Get the double precision floating point number identified by name from the body of the map message.
    GetFloat Get the floating point number identified by name from the body of the map message.
    GetInt Get the integer identified by name from the body of the map message.
    GetLong Get the long integer identified by name from the body of the map message.
    GetObject Get a reference to the value of a name-value pair, from the body of the map message.
    GetShort Get the short integer identified by name from the body of the map message.
    GetString Get the string identified by name from the body of the map message.
    ItemExists Check whether the body of the map message contains a name-value pair with the specified name.
    SetBoolean Set a boolean value in the body of the map message.
    SetByte Set a byte in the body of the map message.
    SetBytes Set an array of bytes in the body of the map message.
    SetChar Set a 2-byte character in the body of the map message.
    SetDouble Set a double precision floating point number in the body of the map message.
    SetFloat Set a floating point number in the body of the map message.
    SetInt Set an integer in the body of the map message.
    SetLong Set a long integer in the body of the map message.
    SetObject Set a value, which must be an XMS primitive type, in the body of the map message.
    SetShort Set a short integer in the body of the map message.
    SetString Set a string in the body of the map message.


GetBoolean - Get Boolean Value

    Interface:
    Boolean GetBoolean(String name);
    

Get the boolean value identified by name from the body of the map message.

    Parameters:

      name (input)
      A String object encapsulating the name that identifies the boolean value.

    Returns:
    The boolean value retrieved from the body of the map message.

    Exceptions:

    • XMSException


GetByte - Get Byte

    Interface:
    Byte    GetByte(String name);
        Int16   GetSignedByte(String name);
    

Get the byte identified by name from the body of the map message.

    Parameters:

      name (input)
      A String object encapsulating the name that identifies the byte.

    Returns:
    The byte retrieved from the body of the map message. No data conversion is performed on the byte.

    Exceptions:

    • XMSException


GetBytes - Get Bytes

    Interface:
    Byte[]  GetBytes(String name);
    

Get the array of bytes identified by name from the body of the map message.

    Parameters:

      name (input)
      A String object encapsulating the name that identifies the array of bytes.

    Returns:
    The number of bytes in the array.

    Exceptions:

    • XMSException


GetChar - Get Character

    Interface:
    Char    GetChar(String name);
    

Get the character identified by name from the body of the map message.

    Parameters:

      name (input)
      A String object encapsulating the name that identifies the character.

    Returns:
    The character retrieved from the body of the map message.

    Exceptions:

    • XMSException


GetDouble - Get Double Precision Floating Point Number

    Interface:
    Double  GetDouble(String name);
    

Get the double precision floating point number identified by name from the body of the map message.

    Parameters:

      name (input)
      A String object encapsulating the name that identifies the double precision floating point number.

    Returns:
    The double precision floating point number retrieved from the body of the map message.

    Exceptions:

    • XMSException


GetFloat - Get Floating Point Number

    Interface:
    Single  GetFloat(String name);
    

Get the floating point number identified by name from the body of the map message.

    Parameters:

      name (input)
      A String object encapsulating the name that identifies the floating point number.

    Returns:
    The floating point number retrieved from the body of the map message.

    Exceptions:

    • XMSException


GetInt - Get Integer

    Interface:
    Int32   GetInt(String name);
    

Get the integer identified by name from the body of the map message.

    Parameters:

      name (input)
      A String object encapsulating the name that identifies the integer.

    Returns:
    The integer retrieved from the body of the map message.

    Exceptions:

    • XMSException


GetLong - Get Long Integer

    Interface:
    Int64   GetLong(String name);
    

Get the long integer identified by name from the body of the map message.

    Parameters:

      name (input)
      A String object encapsulating the name that identifies the long integer.

    Returns:
    The long integer retrieved from the body of the map message.

    Exceptions:

    • XMSException


GetObject - Get Object

    Interface:
    Object  GetObject(String name);
    

Get a reference to the value of a name-value pair, from the body of the map message. The name-value pair is identified by name.

    Parameters:

      name (input)
      A String object encapsulating the name of the name-value pair.

    Returns:
    The value, which is one of the following object types:

    • Boolean
    • Byte
    • Byte[]
    • Char
    • Double
    • Single
    • Int32
    • Int64
    • Int16
    • String

    Exceptions:
    XMSException


GetShort - Get Short Integer

    Interface:
    Int16   GetShort(String name);
    

Get the short integer identified by name from the body of the map message.

    Parameters:

      name (input)
      A String object encapsulating the name that identifies the short integer.

    Returns:
    The short integer retrieved from the body of the map message.

    Exceptions:

    • XMSException


GetString - Get String

    Interface:
    String  GetString(String name);
    

Get the string identified by name from the body of the map message.

    Parameters:

      name (input)
      A String object encapsulating the name that identifies the string in the body of the map message.

    Returns:
    A String object encapsulating the string retrieved from the body of the map message. If data conversion is required, this value is the string after conversion.

    Exceptions:

    • XMSException


ItemExists - Check Name-Value Pair Exists

    Interface:
    Boolean ItemExists(String name);
    

Check whether the body of the map message contains a name-value pair with the specified name.

    Parameters:

      name (input)
      A String object encapsulating the name of the name-value pair.

    Returns:

    • True, if the body of the map message contains a name-value pair with the specified name.
    • False, if the body of the map message does not contain a name-value pair with the specified name.

    Exceptions:

    • XMSException


SetBoolean - Set Boolean Value

    Interface:
    void  SetBoolean(String name, Boolean value);
    

Set a boolean value in the body of the map message.

    Parameters:

      name (input)
      A String object encapsulating the name to identify the boolean value in the body of the map message.

      value (input)
      The boolean value to be set.

    Returns:
    Void

    Exceptions:

    • XMSException


SetByte - Set Byte

    Interface:
    void  SetByte(String name, Byte value);
    void  SetSignedByte(String name, Int16 value);
    

Set a byte in the body of the map message.

    Parameters:

      name (input)
      A String object encapsulating the name to identify the byte in the body of the map message.

      value (input)
      The byte to be set.

    Returns:
    Void

    Exceptions:

    • XMSException


SetBytes - Set Bytes

    Interface:
    void  SetBytes(String name, Byte[] value);
    

Set an array of bytes in the body of the map message.

    Parameters:

      name (input)
      A String object encapsulating the name to identify the array of bytes in the body of the map message.

      value (input)
      The array of bytes to be set.

    Returns:
    Void

    Exceptions:

    • XMSException


SetChar - Set Character

    Interface:
    void  SetChar(String name, Char value);
    

Set a 2-byte character in the body of the map message.

    Parameters:

      name (input)
      A String object encapsulating the name to identify the character in the body of the map message.

      value (input)
      The character to be set.

    Returns:
    Void

    Exceptions:

    • XMSException


SetDouble - Set Double Precision Floating Point Number

    Interface:
    void  SetDouble(String name, Double value);
    

Set a double precision floating point number in the body of the map message.

    Parameters:

      name (input)
      A String object encapsulating the name to identify the double precision floating point number in the body of the map message.

      value (input)
      The double precision floating point number to be set.

    Returns:
    Void

    Exceptions:

    • XMSException


SetFloat - Set Floating Point Number

    Interface:
    void  SetFloat(String name, Single value);
    

Set a floating point number in the body of the map message.

    Parameters:

      name (input)
      A String object encapsulating the name to identify the floating point number in the body of the map message.

      value (input)
      The floating point number to be set.

    Returns:
    Void

    Exceptions:

    • XMSException


SetInt - Set Integer

    Interface:
    void  SetInt(String name, Int32 value);
    

Set an integer in the body of the map message.

    Parameters:

      name (input)
      A String object encapsulating the name to identify the integer in the body of the map message.

      value (input)
      The integer to be set.

    Returns:
    Void

    Exceptions:

    • XMSException


SetLong - Set Long Integer

    Interface:
    void  SetLong(String name, Int64 value);
    

Set a long integer in the body of the map message.

    Parameters:

      name (input)
      A String object encapsulating the name to identify the long integer in the body of the map message.

      value (input)
      The long integer to be set.

    Returns:
    Void

    Exceptions:

    • XMSException


SetObject - Set Object

    Interface:
    void  SetObject(String name, Object value);
    

Set a value, which must be an XMS primitive type, in the body of the map message.

    Parameters:

      name (input)
      A String object encapsulating the name to identify the value in the body of the map message.

      value (input)
      An array of bytes containing the value to be set.

    Returns:
    Void

    Exceptions:

    • XMSException


SetShort - Set Short Integer

    Interface:
    void  SetShort(String name, Int16 value);
    

Set a short integer in the body of the map message.

    Parameters:

      name (input)
      A String object encapsulating the name to identify the short integer in the body of the map message.

      value (input)
      The short integer to be set.

    Returns:
    Void

    Exceptions:

    • XMSException


SetString - Set String

    Interface:
    void  SetString(String name, String value);
    

Set a string in the body of the map message.

    Parameters:

      name (input)
      A String object encapsulating the name to identify the string in the body of the map message.

      value (input)
      A String object encapsulating the string to be set.

    Returns:
    Void

    Exceptions:

    • XMSException


Inherited properties and methods

The following properties are inherited from the IMessage interface:

The following methods are inherited from the IMessage interface:

The following methods are inherited from the IPropertyContext interface: