org.mortbay.cometd
Class ChannelImpl
java.lang.Object
org.mortbay.cometd.ChannelImpl
- All Implemented Interfaces:
- org.cometd.Channel
- Direct Known Subclasses:
- AbstractBayeux.ServiceChannel
public class ChannelImpl
- extends Object
- implements org.cometd.Channel
A Bayuex Channel
- Author:
- gregw
Method Summary |
void |
addChild(ChannelImpl channel)
|
void |
addDataFilter(org.cometd.DataFilter filter)
|
void |
addListener(org.cometd.ChannelListener listener)
|
void |
deliver(org.cometd.Client from,
Iterable<org.cometd.Client> to,
Object data,
String id)
|
protected void |
doDelivery(ChannelId to,
org.cometd.Client from,
org.cometd.Message msg)
|
boolean |
doRemove(ChannelImpl channel,
List<org.cometd.ChannelBayeuxListener> listeners)
|
int |
getChannelCount()
|
ChannelId |
getChannelId()
|
void |
getChannels(List<org.cometd.Channel> list)
|
ChannelImpl |
getChild(ChannelId id)
|
Collection<org.cometd.DataFilter> |
getDataFilters()
|
String |
getId()
|
int |
getSubscriberCount()
|
Collection<org.cometd.Client> |
getSubscribers()
|
boolean |
isLazy()
A Lazy channel marks published messages as lazy. |
boolean |
isPersistent()
|
void |
publish(org.cometd.Client fromClient,
Object data,
String msgId)
|
void |
publishLazy(org.cometd.Client fromClient,
Object data,
String msgId)
|
boolean |
remove()
|
org.cometd.DataFilter |
removeDataFilter(org.cometd.DataFilter filter)
|
void |
setLazy(boolean lazy)
A Lazy channel marks published messages as lazy. |
void |
setPersistent(boolean persistent)
|
void |
subscribe(org.cometd.Client client)
|
String |
toString()
|
void |
unsubscribe(org.cometd.Client client)
|
_bayeux
protected AbstractBayeux _bayeux
isLazy
public boolean isLazy()
- A Lazy channel marks published messages as lazy.
Lazy messages are queued but do not wake up
waiting clients.
- Returns:
- true if message is lazy
setLazy
public void setLazy(boolean lazy)
- A Lazy channel marks published messages as lazy.
Lazy messages are queued but do not wake up
waiting clients.
- Parameters:
lazy
- true if message is lazy
addChild
public void addChild(ChannelImpl channel)
addDataFilter
public void addDataFilter(org.cometd.DataFilter filter)
- Specified by:
addDataFilter
in interface org.cometd.Channel
- Parameters:
filter
-
getChannelId
public ChannelId getChannelId()
- Returns:
getChild
public ChannelImpl getChild(ChannelId id)
getChannels
public void getChannels(List<org.cometd.Channel> list)
getChannelCount
public int getChannelCount()
getId
public String getId()
- Specified by:
getId
in interface org.cometd.Channel
- Returns:
isPersistent
public boolean isPersistent()
- Specified by:
isPersistent
in interface org.cometd.Channel
deliver
public void deliver(org.cometd.Client from,
Iterable<org.cometd.Client> to,
Object data,
String id)
publish
public void publish(org.cometd.Client fromClient,
Object data,
String msgId)
- Specified by:
publish
in interface org.cometd.Channel
publishLazy
public void publishLazy(org.cometd.Client fromClient,
Object data,
String msgId)
remove
public boolean remove()
- Specified by:
remove
in interface org.cometd.Channel
doRemove
public boolean doRemove(ChannelImpl channel,
List<org.cometd.ChannelBayeuxListener> listeners)
removeDataFilter
public org.cometd.DataFilter removeDataFilter(org.cometd.DataFilter filter)
- Specified by:
removeDataFilter
in interface org.cometd.Channel
- Parameters:
filter
-
setPersistent
public void setPersistent(boolean persistent)
- Specified by:
setPersistent
in interface org.cometd.Channel
subscribe
public void subscribe(org.cometd.Client client)
- Specified by:
subscribe
in interface org.cometd.Channel
- Parameters:
client
-
toString
public String toString()
- Overrides:
toString
in class Object
unsubscribe
public void unsubscribe(org.cometd.Client client)
- Specified by:
unsubscribe
in interface org.cometd.Channel
- Parameters:
client
-
doDelivery
protected void doDelivery(ChannelId to,
org.cometd.Client from,
org.cometd.Message msg)
getSubscribers
public Collection<org.cometd.Client> getSubscribers()
- Specified by:
getSubscribers
in interface org.cometd.Channel
getSubscriberCount
public int getSubscriberCount()
- Specified by:
getSubscriberCount
in interface org.cometd.Channel
getDataFilters
public Collection<org.cometd.DataFilter> getDataFilters()
- Specified by:
getDataFilters
in interface org.cometd.Channel
addListener
public void addListener(org.cometd.ChannelListener listener)
- Specified by:
addListener
in interface org.cometd.Channel
Copyright © 1995-2009 Mort Bay Consulting. All Rights Reserved.