- All Known Subinterfaces:
Message.Mutable
,ServerMessage
,ServerMessage.Mutable
- All Known Implementing Classes:
HashMapMessage
,ServerMessageImpl
The Bayeux protocol exchange information by means of messages.
This interface represents the API of a Bayeux message, and consists mainly of convenience methods to access the known fields of the message map.
This interface comes in both an immutable and mutable
versions.
Mutability may be deeply enforced by an implementation, so that it is not correct
to cast a passed Message, to a Message.Mutable, even if the implementation
allows this.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Method Summary
Modifier and TypeMethodDescriptionConvenience method to retrieve theADVICE_FIELD
Convenience method to retrieve theCHANNEL_FIELD
.Convenience method to retrieve theCHANNEL_FIELD
.Convenience method to retrieve theCLIENT_ID_FIELD
getData()
Convenience method to retrieve theDATA_FIELD
getExt()
Convenience method to retrieve theEXT_FIELD
getId()
Convenience method to retrieve theID_FIELD
boolean
isMeta()
A messages that has a meta channel is dubbed a "meta message".boolean
Publish message replies contain the "successful" fieldboolean
Convenience method to retrieve theSUCCESSFUL_FIELD
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
-
Field Details
-
CLIENT_ID_FIELD
- See Also:
-
DATA_FIELD
- See Also:
-
CHANNEL_FIELD
- See Also:
-
ID_FIELD
- See Also:
-
ERROR_FIELD
- See Also:
-
TIMESTAMP_FIELD
- See Also:
-
TRANSPORT_FIELD
- See Also:
-
ADVICE_FIELD
- See Also:
-
SUCCESSFUL_FIELD
- See Also:
-
SUBSCRIPTION_FIELD
- See Also:
-
EXT_FIELD
- See Also:
-
CONNECTION_TYPE_FIELD
- See Also:
-
VERSION_FIELD
- See Also:
-
MIN_VERSION_FIELD
- See Also:
-
SUPPORTED_CONNECTION_TYPES_FIELD
- See Also:
-
RECONNECT_FIELD
- See Also:
-
INTERVAL_FIELD
- See Also:
-
MAX_INTERVAL_FIELD
- See Also:
-
TIMEOUT_FIELD
- See Also:
-
RECONNECT_RETRY_VALUE
- See Also:
-
RECONNECT_HANDSHAKE_VALUE
- See Also:
-
RECONNECT_NONE_VALUE
- See Also:
-
-
Method Details
-
getAdvice
Convenience method to retrieve theADVICE_FIELD
- Returns:
- the advice of the message
-
getChannel
String getChannel()Convenience method to retrieve theCHANNEL_FIELD
. Bayeux message always have a non null channel.- Returns:
- the channel of the message
-
getChannelId
ChannelId getChannelId()Convenience method to retrieve theCHANNEL_FIELD
. Bayeux message always have a non null channel.- Returns:
- the channel of the message
-
getClientId
String getClientId()Convenience method to retrieve theCLIENT_ID_FIELD
- Returns:
- the client id of the message
-
getData
Object getData()Convenience method to retrieve theDATA_FIELD
- Returns:
- the data of the message
- See Also:
-
isMeta
boolean isMeta()A messages that has a meta channel is dubbed a "meta message".- Returns:
- whether the channel's message is a meta channel
-
isPublishReply
boolean isPublishReply()Publish message replies contain the "successful" field- Returns:
- whether this message is a publish reply (as opposed to a published message)
-
isSuccessful
boolean isSuccessful()Convenience method to retrieve theSUCCESSFUL_FIELD
- Returns:
- whether the message is successful
-
getDataAsMap
-
getExt
-
getId
-