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

## dojox.cometd
Interface Channel

All Known Implementing Classes:
  ChannelImpl

    public interface Channel

A Bayeux Channel.

Method Summary
`String` | `getId()`
`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()`
`void` | `setPersistent(boolean persistent)`
`void` | `subscribe(Client subscriber)` Subscribe to a channel.
`void` | `unsubscribe(Client subscriber)` Unsubscribe to a channel

Method Detail

### remove

    boolean remove()

  Returns:
    true if the Channel has been removed, false if it was not possible to remove the channel

### getId

    String getId()

### publish

    void publish(Client fromClient,
                 Object data,
                 String msgId)

  Publish a message This is equivalent to Bayeux.publish(fromClient,channel.getId(),data,msgId).

### isPersistent

    boolean isPersistent()

  Is the channel persistent. Non persistent channels are removed when the last subscription is removed

  Returns:
    true if the Channel will persist without any subscription.

### setPersistent

    void setPersistent(boolean persistent)

  Parameters:
    `persistent` - true if the Channel will persist without any subscription.

### subscribe

    void subscribe(Client subscriber)

  Subscribe to a channel. Equivalent to bayeux.subscribe(channel.getId(),subscriber,false);

  Parameters:
    `toChannel` -
    `subscriber` -

### unsubscribe

    void unsubscribe(Client subscriber)

  Unsubscribe to a channel

  Parameters:
    `toChannel` -
    `subscriber` -

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 © 2007 Mort Bay Consulting. All Rights Reserved.