|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Bayeux
Bayeux Interface. This interface represents the server side API for the Bayeux messaging protocol.
Field Summary | |
---|---|
static String |
DOJOX_COMETD_BAYEUX
ServletContext attribute name used to obtain the Bayeux object |
Method Summary | |
---|---|
void |
addFilter(String channels,
DataFilter filter)
|
Channel |
getChannel(String channelId,
boolean create)
|
Client |
getClient(String client_id)
|
boolean |
hasChannel(String channel)
|
Client |
newClient(String idprefix,
Listener listener)
|
void |
publish(Client fromClient,
String toChannel,
Object data,
String msgId)
Deliver data to a channel. |
void |
removeFilter(String channels,
DataFilter filter)
|
void |
subscribe(String toChannel,
Client subscriber)
Subscribe to a channel. |
void |
unsubscribe(String toChannel,
Client subscriber)
Unsubscribe to a channel |
Field Detail |
---|
static final String DOJOX_COMETD_BAYEUX
Method Detail |
---|
Client newClient(String idprefix, Listener listener)
idprefix
- listener
-
Client getClient(String client_id)
client_id
-
Channel getChannel(String channelId, boolean create)
void publish(Client fromClient, String toChannel, Object data, String msgId)
fromClient
- The client sending the datadata
- The data itself which must be an Object that can be encoded with JSON
.toChannel
- The Channel ID to which the data is targettedmsgId
- optional message ID or null for automatic generation of a message ID.void subscribe(String toChannel, Client subscriber)
toChannel
- subscriber
- createChannel.
- Create the channel if it does not existvoid unsubscribe(String toChannel, Client subscriber)
toChannel
- subscriber
- boolean hasChannel(String channel)
void addFilter(String channels, DataFilter filter)
void removeFilter(String channels, DataFilter filter)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |