|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mortbay.cometd.ChannelImpl
public class ChannelImpl
A Bayuex Channel
Field Summary | |
---|---|
protected AbstractBayeux |
_bayeux
|
Method Summary | |
---|---|
void |
addChild(ChannelImpl channel)
|
void |
addDataFilter(DataFilter filter)
|
protected void |
doDelivery(ChannelId to,
Client from,
Message msg)
|
ChannelId |
getChannelId()
|
void |
getChannels(List<Channel> list)
|
ChannelImpl |
getChild(ChannelId id)
|
Collection<DataFilter> |
getDataFilters()
|
String |
getId()
|
Collection<Client> |
getSubscribers()
|
String |
getToken(Client client,
boolean subscribe,
boolean send,
boolean oneTime)
|
boolean |
isPersistent()
Is the channel persistent. |
void |
publish(Client fromClient,
Object data,
String msgId)
Publish a message This is equivalent to Bayeux.publish(fromClient,channel.getId(),data,msgId). |
boolean |
remove()
|
DataFilter |
removeDataFilter(DataFilter filter)
|
void |
setPersistent(boolean persistent)
|
void |
subscribe(Client client)
Subscribe to a channel. |
String |
toString()
|
void |
unsubscribe(Client client)
Unsubscribe to a channel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected AbstractBayeux _bayeux
Method Detail |
---|
public void addChild(ChannelImpl channel)
public void addDataFilter(DataFilter filter)
addDataFilter
in interface Channel
filter
- public ChannelId getChannelId()
public ChannelImpl getChild(ChannelId id)
public void getChannels(List<Channel> list)
public String getId()
getId
in interface Channel
public String getToken(Client client, boolean subscribe, boolean send, boolean oneTime)
client
- The client for which this token will be validsubscribe
- True if this token may be used for subscriptionssend
- True if this token may be used for sendoneTime
- True if this token may only be used in one request batch.
public boolean isPersistent()
Channel
isPersistent
in interface Channel
public void publish(Client fromClient, Object data, String msgId)
Channel
publish
in interface Channel
public boolean remove()
remove
in interface Channel
public DataFilter removeDataFilter(DataFilter filter)
removeDataFilter
in interface Channel
filter
- public void setPersistent(boolean persistent)
setPersistent
in interface Channel
persistent
- true if the Channel will persist without any subscription.public void subscribe(Client client)
Channel
subscribe
in interface Channel
client
- public String toString()
toString
in class Object
public void unsubscribe(Client client)
Channel
unsubscribe
in interface Channel
client
- protected void doDelivery(ChannelId to, Client from, Message msg)
public Collection<Client> getSubscribers()
getSubscribers
in interface Channel
public Collection<DataFilter> getDataFilters()
getDataFilters
in interface Channel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |