public interface Message extends Map<String,Object>
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.
Modifier and Type | Interface and Description |
---|---|
static interface |
Message.Mutable
The mutable version of a
Message |
Modifier and Type | Field and Description |
---|---|
static String |
ADVICE_FIELD |
static String |
CHANNEL_FIELD |
static String |
CLIENT_ID_FIELD |
static String |
CONNECTION_TYPE_FIELD |
static String |
DATA_FIELD |
static String |
ERROR_FIELD |
static String |
EXT_FIELD |
static String |
ID_FIELD |
static String |
INTERVAL_FIELD |
static String |
MAX_INTERVAL_FIELD |
static String |
MIN_VERSION_FIELD |
static String |
RECONNECT_FIELD |
static String |
RECONNECT_HANDSHAKE_VALUE |
static String |
RECONNECT_NONE_VALUE |
static String |
RECONNECT_RETRY_VALUE |
static String |
SUBSCRIPTION_FIELD |
static String |
SUCCESSFUL_FIELD |
static String |
SUPPORTED_CONNECTION_TYPES_FIELD |
static String |
TIMEOUT_FIELD |
static String |
TIMESTAMP_FIELD |
static String |
TRANSPORT_FIELD |
static String |
VERSION_FIELD |
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
getAdvice()
Convenience method to retrieve the
ADVICE_FIELD |
String |
getChannel()
Convenience method to retrieve the
CHANNEL_FIELD . |
ChannelId |
getChannelId()
Convenience method to retrieve the
CHANNEL_FIELD . |
String |
getClientId()
Convenience method to retrieve the
CLIENT_ID_FIELD |
Object |
getData()
Convenience method to retrieve the
DATA_FIELD |
Map<String,Object> |
getDataAsMap() |
Map<String,Object> |
getExt()
Convenience method to retrieve the
EXT_FIELD |
String |
getId()
Convenience method to retrieve the
ID_FIELD |
boolean |
isMeta()
A messages that has a meta channel is dubbed a "meta message".
|
boolean |
isPublishReply()
Publish message replies contain the "successful" field
|
boolean |
isSuccessful()
Convenience method to retrieve the
SUCCESSFUL_FIELD |
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
static final String CLIENT_ID_FIELD
static final String DATA_FIELD
static final String CHANNEL_FIELD
static final String ID_FIELD
static final String ERROR_FIELD
static final String TIMESTAMP_FIELD
static final String TRANSPORT_FIELD
static final String ADVICE_FIELD
static final String SUCCESSFUL_FIELD
static final String SUBSCRIPTION_FIELD
static final String EXT_FIELD
static final String CONNECTION_TYPE_FIELD
static final String VERSION_FIELD
static final String MIN_VERSION_FIELD
static final String SUPPORTED_CONNECTION_TYPES_FIELD
static final String RECONNECT_FIELD
static final String INTERVAL_FIELD
static final String MAX_INTERVAL_FIELD
static final String TIMEOUT_FIELD
static final String RECONNECT_RETRY_VALUE
static final String RECONNECT_HANDSHAKE_VALUE
static final String RECONNECT_NONE_VALUE
Map<String,Object> getAdvice()
ADVICE_FIELD
String getChannel()
CHANNEL_FIELD
.
Bayeux message always have a non null channel.ChannelId getChannelId()
CHANNEL_FIELD
.
Bayeux message always have a non null channel.String getClientId()
CLIENT_ID_FIELD
Object getData()
DATA_FIELD
getDataAsMap()
boolean isMeta()
boolean isPublishReply()
boolean isSuccessful()
SUCCESSFUL_FIELD
Map<String,Object> getDataAsMap()
getData()
Map<String,Object> getExt()
EXT_FIELD
Copyright © 2008–2024 The CometD Project. All rights reserved.