|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Bayeux
Bayeux Server Interface.
This interface represents the server side API for the Bayeux messaging protocol.
The implementation of Bayeux will be registered as a ServletContext
attribute
with the name "org.cometd.bayeux". This may be set prior to the context being initialized
(if the instance is shared between contexts) or during context initialization.
Bayeux implementations must be thread safe and multiple threads may simultaneously call Bayeux methods.
Field Summary | |
---|---|
static java.lang.String |
ADVICE_FIELD
Field names inside Bayeux messages - advice field |
static java.lang.String |
ATTRIBUTE
ServletContext attribute name used to obtain the Bayeux object |
static java.lang.String |
CHANNEL_FIELD
Field names inside Bayeux messages - channel field |
static java.lang.String |
CLIENT_FIELD
Field names inside Bayeux messages - clientId field |
static java.lang.String |
CONNECTION_TYPE_FIELD
Field names inside Bayeux messages - connectionType field |
static java.lang.String |
DATA_FIELD
Field names inside Bayeux messages - data field |
static java.lang.String |
ERROR_FIELD
Field names inside Bayeux messages - error field |
static java.lang.String |
EXT_FIELD
Field names inside Bayeux messages - ext field |
static java.lang.String |
HANDSHAKE_RESPONSE
Field values inside Bayeux messages - handshake response |
static java.lang.String |
ID_FIELD
Field names inside Bayeux messages - id field |
static java.lang.String |
INTERVAL_FIELD
Field names inside Bayeux messages - interval field |
static java.lang.String |
JSON_COMMENT_FILTERED_FIELD
Field names inside Bayeux messages - json-comment-filtered field |
static java.lang.String |
JSON_CONTENT_TYPE
http helpers - application/json content type |
static java.lang.String |
JSONP_DEFAULT_NAME
http helpers - default name of the jsonp callback function |
static java.lang.String |
JSONP_PARAMETER
http helpers - name of the jsonp parameter |
static java.lang.String |
MESSAGE_PARAMETER
http helpers - parameter name for json message |
static java.lang.String |
META
Meta definitions for channels |
static java.lang.String |
META_CLIENT
Meta definitions for channels - client messsage |
static java.lang.String |
META_CONNECT
Meta definitions for channels - connect message |
static java.lang.String |
META_DISCONNECT
Meta definitions for channels - disconnect messsage |
static java.lang.String |
META_HANDSHAKE
Meta definitions for channels - handshake messsage |
static java.lang.String |
META_PING
Meta definitions for channels - ping messsage |
static java.lang.String |
META_SLASH
Meta definitions for channels |
static java.lang.String |
META_STATUS
Meta definitions for channels - status messsage |
static java.lang.String |
META_SUBSCRIBE
Meta definitions for channels - subscribe messsage |
static java.lang.String |
META_UNSUBSCRIBE
Meta definitions for channels - unsubscribe messsage |
static java.lang.String |
MIN_VERSION_FIELD
Field names inside Bayeux messages - minimumVersion field |
static java.lang.String |
NONE_RESPONSE
Field values inside Bayeux messages - none response |
static java.lang.String |
RECONNECT_FIELD
Field names inside Bayeux messages - reconnect field |
static java.lang.String |
RETRY_RESPONSE
Field values inside Bayeux messages - retry response |
static java.lang.String |
SERVICE
Service channel names-starts with |
static java.lang.String |
SERVICE_SLASH
Service channel names-trailing slash |
static java.lang.String |
SUBSCRIPTION_FIELD
Field names inside Bayeux messages - subscription field |
static java.lang.String |
SUCCESSFUL_FIELD
Field names inside Bayeux messages - successful field |
static java.lang.String |
SUPPORTED_CONNECTION_TYPES_FIELD
Field names inside Bayeux messages - supportedConnectionTypes field |
static java.lang.String |
TIMESTAMP_FIELD
Field names inside Bayeux messages - timestamp field |
static java.lang.String |
TRANSPORT_CALLBACK_POLL
Transport types - callback polling |
static java.lang.String |
TRANSPORT_FIELD
Field names inside Bayeux messages - transport field |
static java.lang.String |
TRANSPORT_FLASH
Transport types - flash |
static java.lang.String |
TRANSPORT_IFRAME
Transport types - iframe |
static java.lang.String |
TRANSPORT_LONG_POLL
Transport types - long polling |
static java.lang.String |
VERSION_FIELD
Field names inside Bayeux messages - version field |
Method Summary | |
---|---|
void |
addExtension(Extension ext)
Adds a bayeux extension. |
void |
addListener(BayeuxListener listener)
Adds a bayeux listener, |
Channel |
getChannel(java.lang.String channelId,
boolean create)
Get a Channel instance by ID. |
java.util.Collection<Channel> |
getChannels()
Get all known channels. |
Client |
getClient(java.lang.String clientId)
Get Client by ID. |
java.util.Collection<Client> |
getClients()
Get a collection of all Clients. |
javax.servlet.http.HttpServletRequest |
getCurrentRequest()
Get the current Servlet Request. |
int |
getMaxClientQueue()
|
SecurityPolicy |
getSecurityPolicy()
Get the SecurityPolicy instance. |
boolean |
hasChannel(java.lang.String channel)
Check if channel exists. |
boolean |
hasClient(java.lang.String clientId)
|
Client |
newClient(java.lang.String idprefix)
Create a new server side Client. |
Channel |
removeChannel(java.lang.String channel)
|
Client |
removeClient(java.lang.String clientId)
|
void |
removeExtension(Extension ext)
Removes a bayeux extension. |
void |
removeListener(BayeuxListener listener)
Removes a bayeux listener |
void |
setMaxClientQueue(int size)
|
void |
setSecurityPolicy(SecurityPolicy securityPolicy)
Set the security policy for the Bayeux instance. |
Field Detail |
---|
static final java.lang.String ATTRIBUTE
static final java.lang.String META
static final java.lang.String META_SLASH
static final java.lang.String META_CONNECT
static final java.lang.String META_CLIENT
static final java.lang.String META_DISCONNECT
static final java.lang.String META_HANDSHAKE
static final java.lang.String META_PING
static final java.lang.String META_STATUS
static final java.lang.String META_SUBSCRIBE
static final java.lang.String META_UNSUBSCRIBE
static final java.lang.String CLIENT_FIELD
static final java.lang.String DATA_FIELD
static final java.lang.String CHANNEL_FIELD
static final java.lang.String ID_FIELD
static final java.lang.String ERROR_FIELD
static final java.lang.String TIMESTAMP_FIELD
static final java.lang.String TRANSPORT_FIELD
static final java.lang.String ADVICE_FIELD
static final java.lang.String SUCCESSFUL_FIELD
static final java.lang.String SUBSCRIPTION_FIELD
static final java.lang.String EXT_FIELD
static final java.lang.String CONNECTION_TYPE_FIELD
static final java.lang.String VERSION_FIELD
static final java.lang.String MIN_VERSION_FIELD
static final java.lang.String SUPPORTED_CONNECTION_TYPES_FIELD
static final java.lang.String JSON_COMMENT_FILTERED_FIELD
static final java.lang.String RECONNECT_FIELD
static final java.lang.String INTERVAL_FIELD
static final java.lang.String RETRY_RESPONSE
static final java.lang.String HANDSHAKE_RESPONSE
static final java.lang.String NONE_RESPONSE
static final java.lang.String SERVICE
static final java.lang.String SERVICE_SLASH
static final java.lang.String TRANSPORT_LONG_POLL
static final java.lang.String TRANSPORT_CALLBACK_POLL
static final java.lang.String TRANSPORT_IFRAME
static final java.lang.String TRANSPORT_FLASH
static final java.lang.String JSON_CONTENT_TYPE
static final java.lang.String MESSAGE_PARAMETER
static final java.lang.String JSONP_PARAMETER
static final java.lang.String JSONP_DEFAULT_NAME
Method Detail |
---|
Channel getChannel(java.lang.String channelId, boolean create)
channelId
- The Channel IDcreate
- If true, a channel will be created if it does not exist.
boolean hasChannel(java.lang.String channel)
channel
-
Channel removeChannel(java.lang.String channel)
java.util.Collection<Channel> getChannels()
Client getClient(java.lang.String clientId)
Client
by ID.
clientId
-
boolean hasClient(java.lang.String clientId)
Client newClient(java.lang.String idprefix)
idprefix
- An identifier to prefix to the client ID.
Client
instance with Client.isLocal()
returning true.Client removeClient(java.lang.String clientId)
java.util.Collection<Client> getClients()
SecurityPolicy getSecurityPolicy()
SecurityPolicy
instance.
SecurityPolicy
instance.void setSecurityPolicy(SecurityPolicy securityPolicy)
The Security Policy will be called to check access for all handshakes, subscriptions and publishing.
securityPolicy
- The security policy instance.void addExtension(Extension ext)
ext
- the extension to addremoveExtension(Extension)
void removeExtension(Extension ext)
ext
- the extension to removeaddExtension(Extension)
void addListener(BayeuxListener listener)
listener
- the listener to addremoveListener(BayeuxListener)
void removeListener(BayeuxListener listener)
listener
- the listener to removeaddListener(BayeuxListener)
int getMaxClientQueue()
setMaxClientQueue(int)
void setMaxClientQueue(int size)
size
- The size which if a client queue exceeds, forces a call to
QueueListener#queueMaxed(Client, Message)
to check if the message should be
added. If set to -1, there is no queue limit. If set to zero, messages are
not queued unless a QueueListener
is applied that returns true.getMaxClientQueue()
javax.servlet.http.HttpServletRequest getCurrentRequest()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |