|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ServerChannel
Server side representation of a Bayeux channel.
ServerChannel is the entity that holds a set of
ServerSessions that are subscribed to the channel itself.
A message published to a ServerChannel will be delivered to
all the ServerSession's subscribed to the channel.
Contrary to their client side counterpart (ClientSessionChannel)
a ServerChannel is not scoped with a session.
| Nested Class Summary | |
|---|---|
static interface |
ServerChannel.MessageListener
Listeners objects that implement this interface will be notified of message publish. |
static interface |
ServerChannel.ServerChannelListener
Common interface for ServerChannel listeners. |
static interface |
ServerChannel.SubscriptionListener
Listeners object that implement this interface will be notified of subscription events. |
| Nested classes/interfaces inherited from interface org.cometd.bayeux.server.ConfigurableServerChannel |
|---|
ConfigurableServerChannel.Initializer |
| Field Summary |
|---|
| Fields inherited from interface org.cometd.bayeux.Channel |
|---|
META, META_CONNECT, META_DISCONNECT, META_HANDSHAKE, META_SUBSCRIBE, META_UNSUBSCRIBE |
| Method Summary | |
|---|---|
Set<? extends ServerSession> |
getSubscribers()
|
boolean |
isBroadcast()
A broadcasting channel is a channel that is neither a meta channel not a service channel. |
void |
publish(Session from,
Object data,
String id)
Publishes the given information to this channel. |
void |
publish(Session from,
ServerMessage message)
Publishes the given message to this channel, delivering the message to all the ServerSessions subscribed to
this channel. |
void |
remove()
Removes this channel, and all the children channels. |
| Methods inherited from interface org.cometd.bayeux.server.ConfigurableServerChannel |
|---|
addListener, isLazy, isPersistent, removeListener, setLazy, setPersistent |
| Methods inherited from interface org.cometd.bayeux.Channel |
|---|
getId, isDeepWild, isMeta, isService, isWild |
| Method Detail |
|---|
Set<? extends ServerSession> getSubscribers()
boolean isBroadcast()
void publish(Session from,
ServerMessage message)
Publishes the given message to this channel, delivering
the message to all the ServerSessions subscribed to
this channel.
from - the session from which the message originatesmessage - the message to publishpublish(Session, Object, String)
void publish(Session from,
Object data,
String id)
Publishes the given information to this channel.
from - the session from which the message originatesdata - the data of the messageid - the id of the messagepublish(Session, ServerMessage)void remove()
Removes this channel, and all the children channels.
If channel "/foo", "/foo/bar" and "/foo/blip" exist, removing channel "/foo" will remove also "/foo/bar" and "/foo/blip".
The removal will notify BayeuxServer.ChannelListener
listeners.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||