|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BayeuxServer
The Bayeux Server interface.
An instance of the BayeuxServer interface is available to
webapplications from via the "org.cometd.bayeux" attribute
of the javax.servlet.ServletContext
.
The BayeuxServer API gives access to the
ServerSession
s via the getSession(String)
method. It also allows new LocalSession
to be
created within the server using the newLocalSession(String)
method.
ServerChannel
instances may be accessed via the
getChannel(String)
method, but the server has
no direct relationship with SessionChannel
s or
ClientSession
. If subscription semantics is required, then
the newLocalSession(String)
method should be used to
create a LocalSession
that can subscribe and publish
like a remote bayeux session.
Nested Class Summary | |
---|---|
static interface |
BayeuxServer.BayeuxServerListener
|
static interface |
BayeuxServer.ChannelListener
|
static interface |
BayeuxServer.Extension
Extension API for bayeux server. |
static interface |
BayeuxServer.SessionListener
|
static interface |
BayeuxServer.SubscriptionListener
|
Field Summary | |
---|---|
static java.lang.String |
ATTRIBUTE
ServletContext attribute name used to obtain the Bayeux object |
Method Summary | |
---|---|
void |
addExtension(BayeuxServer.Extension extension)
Adds the given extension to this bayeux object. |
void |
addListener(BayeuxServer.BayeuxServerListener listener)
|
ServerChannel |
getChannel(java.lang.String channelId)
|
ServerChannel |
getChannel(java.lang.String channelId,
boolean create)
|
java.lang.Object |
getCurrentTransport()
Get the current transport for the current thread. |
SecurityPolicy |
getSecurityPolicy()
|
ServerSession |
getSession(java.lang.String clientId)
Get a server session my ID |
LocalSession |
newLocalSession(java.lang.String idHint)
Create a local session. |
ServerMessage.Mutable |
newMessage()
Create a new Message. |
void |
removeListener(BayeuxServer.BayeuxServerListener listener)
|
void |
setSecurityPolicy(SecurityPolicy securityPolicy)
|
Methods inherited from interface org.cometd.bayeux.Bayeux |
---|
getAllowedTransports, getKnownTransportNames, getOption, getOptionNames, getTransport, setOption |
Field Detail |
---|
static final java.lang.String ATTRIBUTE
Method Detail |
---|
void addExtension(BayeuxServer.Extension extension)
extension
- the extension to add#removeExtension(Extension)
void addListener(BayeuxServer.BayeuxServerListener listener)
listener
- void removeListener(BayeuxServer.BayeuxServerListener listener)
listener
- ServerChannel getChannel(java.lang.String channelId)
channelId
-
ServerChannel getChannel(java.lang.String channelId, boolean create)
channelId
- create
-
ServerSession getSession(java.lang.String clientId)
clientId
- the ID
LocalSession newLocalSession(java.lang.String idHint)
idHint
- A hint to be included in the unique client ID.
ServerMessage.Mutable newMessage()
SecurityPolicy getSecurityPolicy()
void setSecurityPolicy(SecurityPolicy securityPolicy)
securityPolicy
- java.lang.Object getCurrentTransport()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |