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.

Since:
1.0

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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Message

public Message()
Initializes a Message object.

Since:
1.0

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.
Since:
1.0

Message

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

Parameters:
other - the other message.
Since:
1.0
Method Detail

getID

public String getID()
Get the message ID.

Returns:
the message ID string.
Since:
1.0

setID

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

Parameters:
id - the id to set
Since:
1.0

getProperties

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

Returns:
the property map.
Since:
1.0

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
Since:
1.0

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.
Since:
1.0

getProperty

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

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

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.
Since:
1.0

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.