Class ServerMessageImpl
java.lang.Object
java.util.AbstractMap<String,Object>
java.util.HashMap<String,Object>
org.cometd.common.HashMapMessage
org.cometd.server.ServerMessageImpl
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,,Object> Message,Message.Mutable,ServerMessage,ServerMessage.Mutable
- See Also:
-
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.MutableNested classes/interfaces inherited from interface org.cometd.bayeux.server.ServerMessage
ServerMessage.Mutable -
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, 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionentrySet()protected voidConvenience method to retrieve theMessage.ADVICE_FIELDgetData()Convenience method to retrieve theMessage.DATA_FIELDgetExt()Convenience method to retrieve theMessage.EXT_FIELDgetJSON()byte[]protected booleanisFrozen()booleanbooleanisLazy()voidsetAssociated(ServerMessage.Mutable associated) voidsetBayeuxContext(BayeuxContext context) voidsetHandled(boolean handled) voidsetLazy(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 expiresvoidsetServerTransport(ServerTransport transport) Methods inherited from class org.cometd.common.HashMapMessage
getAdvice, getChannel, getChannelId, getClientId, getDataAsMap, getExt, getId, isMeta, isPublishReply, isSuccessful, setChannel, setClientId, setData, setId, setSuccessfulMethods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, get, getOrDefault, isEmpty, keySet, merge, newHashMap, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMap
equals, hashCode, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from interface org.cometd.bayeux.Message
getChannel, getChannelId, getClientId, getId, isMeta, isPublishReply, isSuccessfulMethods inherited from interface org.cometd.bayeux.Message.Mutable
getAdvice, getDataAsMap, getExt, setChannel, setClientId, setData, setId, setSuccessful
-
Constructor Details
-
ServerMessageImpl
public ServerMessageImpl()
-
-
Method Details
-
getAssociated
- Specified by:
getAssociatedin interfaceServerMessage- Returns:
- a message associated with this message on the server. Typically this is a meta message that the current message is being sent in response to.
-
setAssociated
- Specified by:
setAssociatedin interfaceServerMessage.Mutable- Parameters:
associated- the message associated with this message
-
isLazy
public boolean isLazy()- Specified by:
isLazyin interfaceServerMessage- Returns:
- true if the message is lazy and should not force the session's queue to be flushed
-
isHandled
public boolean isHandled() -
getBayeuxContext
- Specified by:
getBayeuxContextin interfaceServerMessage- Returns:
- the BayeuxContext associated with this message
-
setBayeuxContext
-
getServerTransport
- Specified by:
getServerTransportin interfaceServerMessage- Returns:
- the ServerTransport associated with this message
-
setServerTransport
-
setLazy
public void setLazy(boolean lazy) Description copied from interface:ServerMessage.MutableA lazy message does not provoke immediately delivery to the client but it will be delivered at first occasion or after a timeout expires- Specified by:
setLazyin interfaceServerMessage.Mutable- Parameters:
lazy- whether the message is lazy
-
setHandled
public void setHandled(boolean handled) -
freeze
-
isFrozen
protected boolean isFrozen() -
getJSON
-
getJSONBytes
public byte[] getJSONBytes() -
getData
Description copied from interface:MessageConvenience method to retrieve theMessage.DATA_FIELD- Specified by:
getDatain interfaceMessage- Overrides:
getDatain classHashMapMessage- Returns:
- the data of the message
- See Also:
-
put
-
entrySet
-
getDataAsMap
- Specified by:
getDataAsMapin interfaceMessage- Overrides:
getDataAsMapin classHashMapMessage- Returns:
- the data of the message as a map
- See Also:
-
getExt
Description copied from interface:MessageConvenience method to retrieve theMessage.EXT_FIELD- Specified by:
getExtin interfaceMessage- Overrides:
getExtin classHashMapMessage- Returns:
- the ext of the message
-
getAdvice
Description copied from interface:MessageConvenience method to retrieve theMessage.ADVICE_FIELD- Specified by:
getAdvicein interfaceMessage- Overrides:
getAdvicein classHashMapMessage- Returns:
- the advice of the message
-