|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.cometd.server.ChannelImpl
public class ChannelImpl
A Bayuex Channel
Constructor Summary | |
---|---|
protected |
ChannelImpl(java.lang.String id,
AbstractBayeux bayeux)
|
Method Summary | |
---|---|
ChannelImpl |
addChild(ChannelImpl channel)
Add a channel |
void |
addDataFilter(DataFilter filter)
Adds the given DataFilter to this channel. |
void |
addListener(ChannelListener listener)
Adds a channel listener to this channel. |
void |
deliver(Client from,
java.lang.Iterable<Client> to,
java.lang.Object data,
java.lang.String id)
|
protected void |
doDelivery(ChannelId to,
Client from,
Message msg)
|
boolean |
doRemove(ChannelImpl channel,
java.util.List<ChannelBayeuxListener> listeners)
|
int |
getChannelCount()
|
ChannelId |
getChannelId()
|
void |
getChannels(java.util.List<Channel> list)
|
ChannelImpl |
getChild(ChannelId id)
|
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()
A Lazy channel marks published messages as lazy. |
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. |
void |
publishLazy(Client fromClient,
java.lang.Object data,
java.lang.String msgId)
|
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)
A Lazy channel marks published messages as lazy. |
void |
setPersistent(boolean persistent)
Sets the persistency of this channel. |
void |
subscribe(Client client)
Subscribes the given Client to this channel. |
java.lang.String |
toString()
|
void |
unsubscribe(Client client)
Unsubscribes the given Client from this channel. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected ChannelImpl(java.lang.String id, AbstractBayeux bayeux)
Method Detail |
---|
public boolean isLazy()
isLazy
in interface Channel
Channel.setLazy(boolean)
public void setLazy(boolean lazy)
setLazy
in interface Channel
lazy
- true if message is lazypublic ChannelImpl addChild(ChannelImpl channel)
channel
-
public void addDataFilter(DataFilter filter)
Channel
DataFilter
to this channel.
addDataFilter
in interface Channel
filter
- Channel.removeDataFilter(DataFilter)
public ChannelId getChannelId()
public ChannelImpl getChild(ChannelId id)
public void getChannels(java.util.List<Channel> list)
public int getChannelCount()
public java.lang.String getId()
getId
in interface Channel
public boolean isPersistent()
Channel
isPersistent
in interface Channel
Channel.setPersistent(boolean)
public void deliver(Client from, java.lang.Iterable<Client> to, java.lang.Object data, java.lang.String id)
public void publish(Client fromClient, java.lang.Object data, java.lang.String msgId)
Channel
publish
in interface Channel
fromClient
- the client source of the message, or nulldata
- the message datamsgId
- the message ID or nullpublic void publishLazy(Client fromClient, java.lang.Object data, java.lang.String msgId)
public boolean remove()
remove
in interface Channel
public boolean doRemove(ChannelImpl channel, java.util.List<ChannelBayeuxListener> listeners)
public DataFilter removeDataFilter(DataFilter filter)
Channel
DataFilter
from this channel.
removeDataFilter
in interface Channel
filter
-
Channel.addDataFilter(DataFilter)
public void setPersistent(boolean persistent)
Channel
setPersistent
in interface Channel
persistent
- true if the channel is persistent, false otherwisepublic void subscribe(Client client)
Channel
Client
to this channel.
subscribe
in interface Channel
client
- Channel.unsubscribe(Client)
public java.lang.String toString()
toString
in class java.lang.Object
public void unsubscribe(Client client)
Channel
Client
from this channel.
unsubscribe
in interface Channel
client
- Channel.subscribe(Client)
protected void doDelivery(ChannelId to, Client from, Message msg)
public java.util.Collection<Client> getSubscribers()
Channel
getSubscribers
in interface Channel
public int getSubscriberCount()
getSubscriberCount
in interface Channel
public java.util.Collection<DataFilter> getDataFilters()
Channel
getDataFilters
in interface Channel
public void addListener(ChannelListener listener)
Channel
addListener
in interface Channel
listener
- the listener to addChannel.removeListener(ChannelListener)
public void removeListener(ChannelListener listener)
Channel
removeListener
in interface Channel
listener
- the listener to removeChannel.addListener(ChannelListener)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |