org.cometd.bayeux
Interface Channel

All Known Subinterfaces:
ServerChannel, SessionChannel

public interface Channel

A Bayeux Channel.

A channel is the primary message routing mechanism within Bayeux:

Channels are identified with URI like paths (eg /foo/bar). 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 name may also be specified with wildcards. For example /meta/* refers to all meta channels and /foo/** refers to all channels such as /foo/bar and /foo/bar/boop.


Field Summary
static java.lang.String META_CONNECT
           
static java.lang.String META_DISCONNECT
           
static java.lang.String META_HANDSHAKE
           
static java.lang.String META_SUBSCRIBE
           
static java.lang.String META_UNSUBSCRIBE
           
 
Method Summary
 java.lang.String getId()
           
 boolean isDeepWild()
          The ServerChannel is deeply wild if it was obtained via an ID ending with "/**".
 boolean isMeta()
           
 boolean isService()
           
 boolean isWild()
          The ServerChannel is wild if it was obtained via an ID ending with "/*".
 

Field Detail

META_HANDSHAKE

static final java.lang.String META_HANDSHAKE
See Also:
Constant Field Values

META_CONNECT

static final java.lang.String META_CONNECT
See Also:
Constant Field Values

META_SUBSCRIBE

static final java.lang.String META_SUBSCRIBE
See Also:
Constant Field Values

META_UNSUBSCRIBE

static final java.lang.String META_UNSUBSCRIBE
See Also:
Constant Field Values

META_DISCONNECT

static final java.lang.String META_DISCONNECT
See Also:
Constant Field Values
Method Detail

getId

java.lang.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()
The ServerChannel is wild if it was obtained via an ID ending with "/*". Wild channels apply to all direct children of the channel before the "/*".

Returns:
true if the channel is wild.

isDeepWild

boolean isDeepWild()
The ServerChannel is deeply wild if it was obtained via an ID ending with "/**". Deeply Wild channels apply to all descendants of the channel before the "/**".

Returns:
true if the channel is deeply wild.


Copyright © 2010 Dojo Foundation. All Rights Reserved.