Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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 java.lang.Object
implements org.cometd.Channel

A Bayeux Channel

Version:
  $Revision: 1891 $ $Date: 2010-05-10 21:12:17 +1000 (Mon, 10 May 2010) $

Constructor Summary
`protected` | `ChannelImpl(java.lang.String id, AbstractBayeux bayeux)`

Method Summary
`ChannelImpl` | `addChild(ChannelImpl channel)` Adds a channel
`void` | `addDataFilter(org.cometd.DataFilter filter)`
`void` | `addListener(org.cometd.ChannelListener listener)`
`void` | `deliver(org.cometd.Client from, java.lang.Iterable<org.cometd.Client> to, java.lang.Object data, java.lang.String id)`
`protected void` | `doDelivery(ChannelId to, org.cometd.Client from, org.cometd.Message msg)`
`boolean` | `doRemove(ChannelImpl channel, java.util.List<org.cometd.ChannelBayeuxListener> listeners)`
`int` | `getChannelCount()`
`ChannelId` | `getChannelId()`
`void` | `getChannels(java.util.List<org.cometd.Channel> list)`
`ChannelImpl` | `getChild(ChannelId id)`
`java.util.Collection<org.cometd.DataFilter>` | `getDataFilters()`
`java.lang.String` | `getId()`
`int` | `getSubscriberCount()`
`java.util.Collection<org.cometd.Client>` | `getSubscribers()`
`boolean` | `isLazy()` A Lazy channel marks published messages as lazy.
`boolean` | `isPersistent()`
`void` | `publish(org.cometd.Client fromClient, java.lang.Object data, java.lang.String msgId)`
`void` | `publishLazy(org.cometd.Client fromClient, java.lang.Object data, java.lang.String msgId)`
`boolean` | `remove()`
`org.cometd.DataFilter` | `removeDataFilter(org.cometd.DataFilter filter)`
`void` | `removeListener(org.cometd.ChannelListener listener)`
`void` | `setLazy(boolean lazy)` A Lazy channel marks published messages as lazy.
`void` | `setPersistent(boolean persistent)`
`void` | `subscribe(org.cometd.Client client)`
`java.lang.String` | `toString()`
`void` | `unsubscribe(org.cometd.Client c)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ChannelImpl

    protected ChannelImpl(java.lang.String id,
                          AbstractBayeux bayeux)

Method Detail

### isLazy

    public boolean isLazy()

  A Lazy channel marks published messages as lazy. Lazy messages are queued but do not wake up waiting clients.

  Specified by:
    `isLazy` in interface `org.cometd.Channel`
  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.

  Specified by:
    `setLazy` in interface `org.cometd.Channel`
  Parameters:
    `lazy` - true if message is lazy

### addChild

    public ChannelImpl addChild(ChannelImpl channel)

  Adds a channel

  Parameters:
    `channel` - the child channel to add
  Returns:
    The added channel, or the existing channel if another thread already added the channel

### addDataFilter

    public void addDataFilter(org.cometd.DataFilter filter)

  Specified by:
    `addDataFilter` in interface `org.cometd.Channel`
  Parameters:
    `filter` - the data filter to add

### getChannelId

    public ChannelId getChannelId()

  Returns:
    the ChannelId of this channel

### getChild

    public ChannelImpl getChild(ChannelId id)

### getChannels

    public void getChannels(java.util.List<org.cometd.Channel> list)

### getChannelCount

    public int getChannelCount()

### getId

    public java.lang.String getId()

  Specified by:
    `getId` in interface `org.cometd.Channel`
  Returns:
    the id of this channel in string form

### isPersistent

    public boolean isPersistent()

  Specified by:
    `isPersistent` in interface `org.cometd.Channel`

### deliver

    public void deliver(org.cometd.Client from,
                        java.lang.Iterable<org.cometd.Client> to,
                        java.lang.Object data,
                        java.lang.String id)

### publish

    public void publish(org.cometd.Client fromClient,
                        java.lang.Object data,
                        java.lang.String msgId)

  Specified by:
    `publish` in interface `org.cometd.Channel`

### publishLazy

    public void publishLazy(org.cometd.Client fromClient,
                            java.lang.Object data,
                            java.lang.String msgId)

### remove

    public boolean remove()

  Specified by:
    `remove` in interface `org.cometd.Channel`

### doRemove

    public boolean doRemove(ChannelImpl channel,
                            java.util.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` - the data filter to remove

### 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` - the client to subscribe to this channel

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### unsubscribe

    public void unsubscribe(org.cometd.Client c)

  Specified by:
    `unsubscribe` in interface `org.cometd.Channel`
  Parameters:
    `c` - the client to unsubscribe from this channel

### doDelivery

    protected void doDelivery(ChannelId to,
                              org.cometd.Client from,
                              org.cometd.Message msg)

### getSubscribers

    public java.util.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 java.util.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`

### removeListener

    public void removeListener(org.cometd.ChannelListener listener)

  Specified by:
    `removeListener` in interface `org.cometd.Channel`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.