org.cometd.common
Class HashMapMessage

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<String,Object>
          extended by org.cometd.common.HashMapMessage
All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>, Message, Message.Mutable

public class HashMapMessage
extends HashMap<String,Object>
implements Message.Mutable, Serializable

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface org.cometd.bayeux.Message
Message.Mutable
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from interface org.cometd.bayeux.Message
ADVICE_FIELD, CHANNEL_FIELD, CLIENT_ID_FIELD, CONNECTION_TYPE_FIELD, DATA_FIELD, ERROR_FIELD, EXT_FIELD, ID_FIELD, INTERVAL_FIELD, MIN_VERSION_FIELD, RECONNECT_FIELD, RECONNECT_HANDSHAKE_VALUE, RECONNECT_NONE_VALUE, RECONNECT_RETRY_VALUE, SUBSCRIPTION_FIELD, SUCCESSFUL_FIELD, SUPPORTED_CONNECTION_TYPES_FIELD, TIMEOUT_FIELD, TIMESTAMP_FIELD, TRANSPORT_FIELD, VERSION_FIELD
 
Constructor Summary
HashMapMessage()
           
HashMapMessage(Message message)
           
 
Method Summary
 Map<String,Object> getAdvice()
           
 Map<String,Object> getAdvice(boolean create)
           
 String getChannel()
           
 ChannelId getChannelId()
           
 String getClientId()
           
 Object getData()
           
 Map<String,Object> getDataAsMap()
           
 Map<String,Object> getDataAsMap(boolean create)
           
 Map<String,Object> getExt()
           
 Map<String,Object> getExt(boolean create)
           
 String getId()
           
 String getJSON()
           
 boolean isMeta()
           
 boolean isSuccessful()
           
static List<Message.Mutable> parseMessages(String content)
          Deprecated. Use JSONContext#parse(String) instead
 void setChannel(String channel)
           
 void setClientId(String clientId)
           
 void setData(Object data)
           
 void setId(String id)
           
 void setSuccessful(boolean successful)
           
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

HashMapMessage

public HashMapMessage()

HashMapMessage

public HashMapMessage(Message message)
Method Detail

getAdvice

public Map<String,Object> getAdvice()
Specified by:
getAdvice in interface Message

getChannel

public String getChannel()
Specified by:
getChannel in interface Message

getChannelId

public ChannelId getChannelId()
Specified by:
getChannelId in interface Message

getClientId

public String getClientId()
Specified by:
getClientId in interface Message

getData

public Object getData()
Specified by:
getData in interface Message

getDataAsMap

public Map<String,Object> getDataAsMap()
Specified by:
getDataAsMap in interface Message

getExt

public Map<String,Object> getExt()
Specified by:
getExt in interface Message

getId

public String getId()
Specified by:
getId in interface Message

getJSON

public String getJSON()
Specified by:
getJSON in interface Message

getAdvice

public Map<String,Object> getAdvice(boolean create)
Specified by:
getAdvice in interface Message.Mutable

getDataAsMap

public Map<String,Object> getDataAsMap(boolean create)
Specified by:
getDataAsMap in interface Message.Mutable

getExt

public Map<String,Object> getExt(boolean create)
Specified by:
getExt in interface Message.Mutable

isMeta

public boolean isMeta()
Specified by:
isMeta in interface Message

isSuccessful

public boolean isSuccessful()
Specified by:
isSuccessful in interface Message

setChannel

public void setChannel(String channel)
Specified by:
setChannel in interface Message.Mutable

setClientId

public void setClientId(String clientId)
Specified by:
setClientId in interface Message.Mutable

setData

public void setData(Object data)
Specified by:
setData in interface Message.Mutable

setId

public void setId(String id)
Specified by:
setId in interface Message.Mutable

setSuccessful

public void setSuccessful(boolean successful)
Specified by:
setSuccessful in interface Message.Mutable

parseMessages

@Deprecated
public static List<Message.Mutable> parseMessages(String content)
Deprecated. Use JSONContext#parse(String) instead

Parses the given string into a list of Mutables.

Parameters:
content - the string to parse
Returns:
the list of parsed Mutables


Copyright © 2008-2011 Dojo Foundation. All Rights Reserved.