Interface Message.Mutable
- All Known Subinterfaces:
ServerMessage.Mutable
- All Known Implementing Classes:
HashMapMessage
,ServerMessageImpl
- Enclosing interface:
Message
The mutable version of a
Message
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.cometd.bayeux.Message
Message.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
-
Method Summary
Modifier and TypeMethodDescriptiongetAdvice
(boolean create) Convenience method to retrieve theMessage.ADVICE_FIELD
and create it if it does not existgetDataAsMap
(boolean create) Convenience method to retrieve theMessage.DATA_FIELD
and create it if it does not existgetExt
(boolean create) Convenience method to retrieve theMessage.EXT_FIELD
and create it if it does not existvoid
setChannel
(String channel) void
setClientId
(String clientId) void
void
void
setSuccessful
(boolean successful) Methods inherited from interface java.util.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
Methods inherited from interface org.cometd.bayeux.Message
getAdvice, getChannel, getChannelId, getClientId, getData, getDataAsMap, getExt, getId, isMeta, isPublishReply, isSuccessful
-
Method Details
-
getAdvice
Convenience method to retrieve theMessage.ADVICE_FIELD
and create it if it does not exist- Parameters:
create
- whether to create the advice field if it does not exist- Returns:
- the advice of the message
-
getDataAsMap
Convenience method to retrieve theMessage.DATA_FIELD
and create it if it does not exist- Parameters:
create
- whether to create the data field if it does not exist- Returns:
- the data of the message
-
getExt
Convenience method to retrieve theMessage.EXT_FIELD
and create it if it does not exist- Parameters:
create
- whether to create the ext field if it does not exist- Returns:
- the ext of the message
-
setChannel
- Parameters:
channel
- the channel of this message
-
setClientId
- Parameters:
clientId
- the client id of this message
-
setData
- Parameters:
data
- the data of this message
-
setId
- Parameters:
id
- the id of this message
-
setSuccessful
void setSuccessful(boolean successful) - Parameters:
successful
- the successfulness of this message
-