com.esri.core.symbol.advanced
Class Message

java.lang.Object
  extended by com.esri.core.symbol.advanced.Message

public class Message
extends Object

Message contains properties which can be processed by MessageProcessor. Apart from message ID, all other properties are name-value pairs which should be recognizable to the target message processor.


Constructor Summary
Message()
          Initializes a Message object.
Message(org.codehaus.jackson.JsonParser parser)
          Initializes a Message object from an JsonParsor object
Message(Message other)
          Initializes a Message object from other message
 
Method Summary
 void addProperties(Map<String,Object> properties)
          Adds the properties as a map.
 String getID()
          Get the message ID.
 Map<String,Object> getProperties()
          Gets the properties as a map.
 Object getProperty(String name)
          Returns the property value in specified name.
 void setID(String id)
          Sets the message ID.
 void setProperties(Map<String,Object> properties)
          Sets the properties as a map.
 void setProperty(String name, Object value)
          Sets the property with specified name-value pair.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Message

public Message()
Initializes a Message object.


Message

public Message(org.codehaus.jackson.JsonParser parser)
Initializes a Message object from an JsonParsor object

Parameters:
parser - JsonParser object which represents a message in JSON format.

Message

public Message(Message other)
Initializes a Message object from other message

Parameters:
other - the other message.
Method Detail

getID

public String getID()
Get the message ID.

Returns:
the message ID string.

setID

public void setID(String id)
Sets the message ID.

Parameters:
id - the id to set

getProperties

public Map<String,Object> getProperties()
Gets the properties as a map.

Returns:
the property map.

setProperties

public void setProperties(Map<String,Object> properties)
Sets the properties as a map. The old properties are replaced.

Parameters:
properties - the properties to set

addProperties

public void addProperties(Map<String,Object> properties)
Adds the properties as a map. The new properties are added into the old properties.

Parameters:
properties - the properties to add.

getProperty

public Object getProperty(String name)
Returns the property value in specified name.

Parameters:
name - property name.
Returns:
property value.

setProperty

public void setProperty(String name,
                        Object value)
Sets the property with specified name-value pair. If the property already exists, the old value is replaced.

Parameters:
name - property name.
value - property value.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.