public class ServerMessageImpl extends HashMapMessage implements ServerMessage.Mutable
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
ServerMessage.Mutable
ADVICE_FIELD, CHANNEL_FIELD, CLIENT_ID_FIELD, CONNECTION_TYPE_FIELD, DATA_FIELD, ERROR_FIELD, EXT_FIELD, ID_FIELD, INTERVAL_FIELD, MAX_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 and Description |
---|
ServerMessageImpl() |
Modifier and Type | Method and Description |
---|---|
Set<Map.Entry<String,Object>> |
entrySet() |
protected void |
freeze(String json) |
Map<String,Object> |
getAdvice()
Convenience method to retrieve the
Message.ADVICE_FIELD |
ServerMessage.Mutable |
getAssociated() |
BayeuxContext |
getBayeuxContext() |
Object |
getData()
Convenience method to retrieve the
Message.DATA_FIELD |
Map<String,Object> |
getDataAsMap() |
Map<String,Object> |
getExt()
Convenience method to retrieve the
Message.EXT_FIELD |
String |
getJSON() |
byte[] |
getJSONBytes() |
ServerTransport |
getServerTransport() |
protected boolean |
isFrozen() |
boolean |
isHandled() |
boolean |
isLazy() |
Object |
put(String key,
Object value) |
void |
setAssociated(ServerMessage.Mutable associated) |
void |
setBayeuxContext(BayeuxContext context) |
void |
setHandled(boolean handled) |
void |
setLazy(boolean lazy)
A lazy message does not provoke immediately delivery to the client
but it will be delivered at first occasion or after a timeout expires
|
void |
setServerTransport(ServerTransport transport) |
getAdvice, getChannel, getChannelId, getClientId, getDataAsMap, getExt, getId, isMeta, isPublishReply, isSuccessful, setChannel, setClientId, setData, setId, setSuccessful
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, get, getOrDefault, isEmpty, keySet, merge, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
equals, hashCode, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
getAdvice, getDataAsMap, getExt, setChannel, setClientId, setData, setId, setSuccessful
getChannel, getChannelId, getClientId, getId, isMeta, isPublishReply, isSuccessful
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
public ServerMessage.Mutable getAssociated()
getAssociated
in interface ServerMessage
public void setAssociated(ServerMessage.Mutable associated)
setAssociated
in interface ServerMessage.Mutable
associated
- the message associated with this messagepublic boolean isLazy()
isLazy
in interface ServerMessage
public boolean isHandled()
public BayeuxContext getBayeuxContext()
getBayeuxContext
in interface ServerMessage
public void setBayeuxContext(BayeuxContext context)
public ServerTransport getServerTransport()
getServerTransport
in interface ServerMessage
public void setServerTransport(ServerTransport transport)
public void setLazy(boolean lazy)
ServerMessage.Mutable
setLazy
in interface ServerMessage.Mutable
lazy
- whether the message is lazypublic void setHandled(boolean handled)
protected void freeze(String json)
protected boolean isFrozen()
public String getJSON()
public byte[] getJSONBytes()
public Object getData()
Message
Message.DATA_FIELD
getData
in interface Message
getData
in class HashMapMessage
Message.getDataAsMap()
public Map<String,Object> getDataAsMap()
getDataAsMap
in interface Message
getDataAsMap
in class HashMapMessage
Message.getData()
public Map<String,Object> getExt()
Message
Message.EXT_FIELD
getExt
in interface Message
getExt
in class HashMapMessage
public Map<String,Object> getAdvice()
Message
Message.ADVICE_FIELD
getAdvice
in interface Message
getAdvice
in class HashMapMessage
Copyright © 2008–2024 The CometD Project. All rights reserved.