|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Channel
A Bayeux channel.
A Channel represents a routing path for messages to Client
s, and
looks like a directory path:
/some/channelClients may subscribe to a channel and will be delivered all messages published to the channel.
Channels may be lazy, which means that all messages published to that channel will be marked as lazy. Lazy messages are queued but do not wake up waiting clients.
Method Summary | |
---|---|
void |
addDataFilter(DataFilter filter)
Adds the given DataFilter to this channel. |
void |
addListener(ChannelListener listener)
Adds a channel listener to this channel. |
java.util.Collection<DataFilter> |
getDataFilters()
Returns a collection copy of the data filters for this channel. |
java.lang.String |
getId()
|
int |
getSubscriberCount()
|
java.util.Collection<Client> |
getSubscribers()
Returns a collection that is a copy of clients subscribed to this channel. |
boolean |
isLazy()
|
boolean |
isPersistent()
Indicates whether the channel is persistent or not. |
void |
publish(Client fromClient,
java.lang.Object data,
java.lang.String msgId)
Publishes a message. |
boolean |
remove()
|
DataFilter |
removeDataFilter(DataFilter filter)
Removes the given DataFilter from this channel. |
void |
removeListener(ChannelListener listener)
Removes the channel listener from this channel. |
void |
setLazy(boolean lazy)
Sets the lazyness of the channel |
void |
setPersistent(boolean persistent)
Sets the persistency of this channel. |
void |
subscribe(Client subscriber)
Subscribes the given Client to this channel. |
void |
unsubscribe(Client subscriber)
Unsubscribes the given Client from this channel. |
Method Detail |
---|
boolean remove()
java.lang.String getId()
void publish(Client fromClient, java.lang.Object data, java.lang.String msgId)
fromClient
- the client source of the message, or nulldata
- the message datamsgId
- the message ID or nullboolean isPersistent()
setPersistent(boolean)
void setPersistent(boolean persistent)
persistent
- true if the channel is persistent, false otherwisevoid subscribe(Client subscriber)
Client
to this channel.
subscriber
- the client to subscribeunsubscribe(Client)
void unsubscribe(Client subscriber)
Client
from this channel.
subscriber
- the client to unsubscribesubscribe(Client)
java.util.Collection<Client> getSubscribers()
int getSubscriberCount()
void addDataFilter(DataFilter filter)
DataFilter
to this channel.
filter
- the data filter to addremoveDataFilter(DataFilter)
DataFilter removeDataFilter(DataFilter filter)
DataFilter
from this channel.
filter
- the data filter to remove
addDataFilter(DataFilter)
java.util.Collection<DataFilter> getDataFilters()
void addListener(ChannelListener listener)
listener
- the listener to addremoveListener(ChannelListener)
void removeListener(ChannelListener listener)
listener
- the listener to removeaddListener(ChannelListener)
boolean isLazy()
setLazy(boolean)
void setLazy(boolean lazy)
lazy
- true if channel is lazy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |