org.cometd.bayeux
Interface Channel

All Known Subinterfaces:
ClientSessionChannel, ConfigurableServerChannel, ServerChannel

public interface Channel

A Bayeux channel is the primary message routing mechanism within Bayeux: both Bayeux clients and Bayeux server use channels to group listeners that are interested in receiving messages with that channel.

This interface is the common root for both the client side representation of a channel and the server side representation of a channel.

Channels are identified with strings that look like paths (e.g. "/foo/bar") called "channel id".
Meta channels have channel ids starting with "/meta/" and are reserved for the operation of they Bayeux protocol.
Service channels have channel ids starting with "/service/" and are channels for which publish is disabled, so that only server side listeners will receive the messages.

A channel id may also be specified with wildcards.
For example "/meta/*" refers to all top level meta channels like "/meta/subscribe" or "/meta/handshake".
The channel "/foo/**" is deeply wild and refers to all channels like "/foo/bar", "/foo/bar/bob" and "/foo/bar/wibble/bip".
Wildcards can only be specified as last segment of a channel; therefore channel "/foo/*/bar/** is an invalid channel.

Version:
$Revision: 1483 $ $Date: 2009-03-04 14:56:47 +0100 (Wed, 04 Mar 2009) $

Field Summary
static String META
          Constant representing the meta prefix
static String META_CONNECT
          Constant representing the connect meta channel
static String META_DISCONNECT
          Constant representing the disconnect meta channel
static String META_HANDSHAKE
          Constant representing the handshake meta channel.
static String META_SUBSCRIBE
          Constant representing the subscribe meta channel
static String META_UNSUBSCRIBE
          Constant representing the unsubscribe meta channel
 
Method Summary
 String getId()
           
 boolean isDeepWild()
           
 boolean isMeta()
           
 boolean isService()
           
 boolean isWild()
           
 

Field Detail

META

static final String META
Constant representing the meta prefix

See Also:
Constant Field Values

META_HANDSHAKE

static final String META_HANDSHAKE
Constant representing the handshake meta channel.

See Also:
Constant Field Values

META_CONNECT

static final String META_CONNECT
Constant representing the connect meta channel

See Also:
Constant Field Values

META_SUBSCRIBE

static final String META_SUBSCRIBE
Constant representing the subscribe meta channel

See Also:
Constant Field Values

META_UNSUBSCRIBE

static final String META_UNSUBSCRIBE
Constant representing the unsubscribe meta channel

See Also:
Constant Field Values

META_DISCONNECT

static final String META_DISCONNECT
Constant representing the disconnect meta channel

See Also:
Constant Field Values
Method Detail

getId

String getId()
Returns:
The channel id

isMeta

boolean isMeta()
Returns:
true if the channel is a meta channel

isService

boolean isService()
Returns:
true if the channel is a service channel

isWild

boolean isWild()
Returns:
true if the channel is wild.

isDeepWild

boolean isDeepWild()
Returns:
true if the channel is deeply wild.


Copyright © 2008-2010 Dojo Foundation. All Rights Reserved.