org.cometd.server
Class ServerMessageImpl

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

public class ServerMessageImpl
extends HashMapMessage
implements ServerMessage.Mutable

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.server.ServerMessage
ServerMessage.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
ServerMessageImpl()
           
 
Method Summary
 Set<Map.Entry<String,Object>> entrySet()
           
protected  void freeze(String json)
           
 Map<String,Object> getAdvice()
           
 ServerMessage.Mutable getAssociated()
           
 Object getData()
           
 Map<String,Object> getDataAsMap()
           
 Map<String,Object> getExt()
           
 String getJSON()
           
protected  boolean isFrozen()
           
 boolean isLazy()
           
static ServerMessage.Mutable[] parseServerMessages(Reader reader, boolean jsonDebug)
          Deprecated.  
static ServerMessage.Mutable[] parseServerMessages(String json)
          Deprecated.  
 Object put(String key, Object value)
           
 void setAssociated(ServerMessage.Mutable associated)
           
 void setLazy(boolean lazy)
           
 
Methods inherited from class org.cometd.common.HashMapMessage
getAdvice, getChannel, getChannelId, getClientId, getDataAsMap, getExt, getId, isMeta, isSuccessful, parseMessages, setChannel, setClientId, setData, setId, setSuccessful
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, get, isEmpty, keySet, 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 org.cometd.bayeux.Message.Mutable
getAdvice, getDataAsMap, getExt, setChannel, setClientId, setData, setId, setSuccessful
 
Methods inherited from interface org.cometd.bayeux.Message
getChannel, getChannelId, getClientId, getId, isMeta, isSuccessful
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, putAll, remove, size, values
 

Constructor Detail

ServerMessageImpl

public ServerMessageImpl()
Method Detail

getAssociated

public ServerMessage.Mutable getAssociated()
Specified by:
getAssociated in interface ServerMessage

setAssociated

public void setAssociated(ServerMessage.Mutable associated)
Specified by:
setAssociated in interface ServerMessage.Mutable

isLazy

public boolean isLazy()
Specified by:
isLazy in interface ServerMessage

setLazy

public void setLazy(boolean lazy)
Specified by:
setLazy in interface ServerMessage.Mutable

freeze

protected void freeze(String json)

isFrozen

protected boolean isFrozen()

getJSON

public String getJSON()
Specified by:
getJSON in interface Message
Overrides:
getJSON in class HashMapMessage

getData

public Object getData()
Specified by:
getData in interface Message
Overrides:
getData in class HashMapMessage

put

public Object put(String key,
                  Object value)
Specified by:
put in interface Map<String,Object>
Overrides:
put in class HashMap<String,Object>

entrySet

public Set<Map.Entry<String,Object>> entrySet()
Specified by:
entrySet in interface Map<String,Object>
Overrides:
entrySet in class HashMap<String,Object>

getDataAsMap

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

getExt

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

getAdvice

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

parseServerMessages

@Deprecated
public static ServerMessage.Mutable[] parseServerMessages(Reader reader,
                                                                     boolean jsonDebug)
                                                   throws ParseException,
                                                          IOException
Deprecated. 

Parses the content of the given reader into an array of ServerMessage.Mutables.

Parameters:
reader - the reader to read from
jsonDebug - whether or not read the whole content of the reader into a string and then parse the string
Returns:
an array of ServerMessage.Mutables
Throws:
ParseException - if the parsing fails
IOException - if reading from the reader fails

parseServerMessages

@Deprecated
public static ServerMessage.Mutable[] parseServerMessages(String json)
                                                   throws ParseException
Deprecated. 

Parses the given string into an array of ServerMessage.Mutables.

Parameters:
json - the string to parse
Returns:
an array of ServerMessage.Mutables
Throws:
ParseException - if the parsing fails


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