Class HashMapMessage
- All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>, Message, Message.Mutable
- Direct Known Subclasses:
ServerMessageImpl
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> Nested classes/interfaces inherited from interface Message
Message.Mutable -
Field Summary
Fields inherited from interface 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 TypeMethodDescriptionConvenience method to retrieve theMessage.ADVICE_FIELDgetAdvice(boolean create) Convenience method to retrieve theMessage.ADVICE_FIELDand create it if it does not existConvenience method to retrieve theMessage.CHANNEL_FIELD.Convenience method to retrieve theMessage.CHANNEL_FIELD.Convenience method to retrieve theMessage.CLIENT_ID_FIELDgetData()Convenience method to retrieve theMessage.DATA_FIELDgetDataAsMap(boolean create) Convenience method to retrieve theMessage.DATA_FIELDand create it if it does not existgetExt()Convenience method to retrieve theMessage.EXT_FIELDgetExt(boolean create) Convenience method to retrieve theMessage.EXT_FIELDand create it if it does not existgetId()Convenience method to retrieve theMessage.ID_FIELDbooleanisMeta()A messages that has a meta channel is dubbed a "meta message".booleanPublish message replies contain the "successful" fieldbooleanConvenience method to retrieve theMessage.SUCCESSFUL_FIELDvoidsetChannel(String channel) voidsetClientId(String clientId) voidvoidvoidsetSuccessful(boolean successful) Methods inherited from class HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class AbstractMap
equals, hashCode, toStringMethods inherited from interface Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Constructor Details
-
HashMapMessage
public HashMapMessage() -
HashMapMessage
-
-
Method Details
-
getAdvice
-
getChannel
Description copied from interface:MessageConvenience method to retrieve theMessage.CHANNEL_FIELD. Bayeux message always have a non null channel.- Specified by:
getChannelin interfaceMessage- Returns:
- the channel of the message
-
getChannelId
Description copied from interface:MessageConvenience method to retrieve theMessage.CHANNEL_FIELD. Bayeux message always have a non null channel.- Specified by:
getChannelIdin interfaceMessage- Returns:
- the channel of the message
-
getClientId
Description copied from interface:MessageConvenience method to retrieve theMessage.CLIENT_ID_FIELD- Specified by:
getClientIdin interfaceMessage- Returns:
- the client id of the message
-
getData
Description copied from interface:MessageConvenience method to retrieve theMessage.DATA_FIELD -
getDataAsMap
- Specified by:
getDataAsMapin interfaceMessage- Returns:
- the data of the message as a map
- See Also:
-
getExt
-
getId
Description copied from interface:MessageConvenience method to retrieve theMessage.ID_FIELD -
getAdvice
Description copied from interface:Message.MutableConvenience method to retrieve theMessage.ADVICE_FIELDand create it if it does not exist- Specified by:
getAdvicein interfaceMessage.Mutable- Parameters:
create- whether to create the advice field if it does not exist- Returns:
- the advice of the message
-
getDataAsMap
Description copied from interface:Message.MutableConvenience method to retrieve theMessage.DATA_FIELDand create it if it does not exist- Specified by:
getDataAsMapin interfaceMessage.Mutable- Parameters:
create- whether to create the data field if it does not exist- Returns:
- the data of the message
-
getExt
Description copied from interface:Message.MutableConvenience method to retrieve theMessage.EXT_FIELDand create it if it does not exist- Specified by:
getExtin interfaceMessage.Mutable- Parameters:
create- whether to create the ext field if it does not exist- Returns:
- the ext of the message
-
isMeta
-
isPublishReply
public boolean isPublishReply()Description copied from interface:MessagePublish message replies contain the "successful" field- Specified by:
isPublishReplyin interfaceMessage- Returns:
- whether this message is a publish reply (as opposed to a published message)
-
isSuccessful
public boolean isSuccessful()Description copied from interface:MessageConvenience method to retrieve theMessage.SUCCESSFUL_FIELD- Specified by:
isSuccessfulin interfaceMessage- Returns:
- whether the message is successful
-
setChannel
- Specified by:
setChannelin interfaceMessage.Mutable- Parameters:
channel- the channel of this message
-
setClientId
- Specified by:
setClientIdin interfaceMessage.Mutable- Parameters:
clientId- the client id of this message
-
setData
- Specified by:
setDatain interfaceMessage.Mutable- Parameters:
data- the data of this message
-
setId
- Specified by:
setIdin interfaceMessage.Mutable- Parameters:
id- the id of this message
-
setSuccessful
public void setSuccessful(boolean successful) - Specified by:
setSuccessfulin interfaceMessage.Mutable- Parameters:
successful- the successfulness of this message
-