org.cometd.bayeux.server
Interface ConfigurableServerChannel

All Superinterfaces:
Channel
All Known Subinterfaces:
ServerChannel

public interface ConfigurableServerChannel
extends Channel

A ConfigurableServerChannel offers an API that can be used to configure ServerChannels at creation time.

ServerChannels may be created concurrently via BayeuxServer#createIfAbsent(String, Initializer...) and it is important that the creation of a channel is atomic so that its configuration is executed only once, and so that it is guaranteed that it happens before any message can be published or received by the channel.

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

Nested Class Summary
static interface ConfigurableServerChannel.Initializer
          A listener interface by means of which listeners can atomically set the initial configuration of a channel.
 
Field Summary
 
Fields inherited from interface org.cometd.bayeux.Channel
META, META_CONNECT, META_DISCONNECT, META_HANDSHAKE, META_SUBSCRIBE, META_UNSUBSCRIBE
 
Method Summary
 void addAuthorizer(Authorizer authorizer)
          Adds the given Authorizer that grants or denies operations on this channel.
 void addListener(ServerChannel.ServerChannelListener listener)
           
 List<Authorizer> getAuthorizers()
           
 List<ServerChannel.ServerChannelListener> getListeners()
           
 boolean isLazy()
           
 boolean isPersistent()
           
 void removeAuthorizer(Authorizer authorizer)
          Removes the given Authorizer.
 void removeListener(ServerChannel.ServerChannelListener listener)
           
 void setLazy(boolean lazy)
          A lazy channel marks all messages published to it as lazy.
 void setPersistent(boolean persistent)
          A persistent channel is not removed when the last subscription is removed
 
Methods inherited from interface org.cometd.bayeux.Channel
getAttribute, getAttributeNames, getChannelId, getId, isDeepWild, isMeta, isService, isWild, removeAttribute, setAttribute
 

Method Detail

addListener

void addListener(ServerChannel.ServerChannelListener listener)
Parameters:
listener - the listener to add
See Also:
#removeListener(ServerChannelListener)

removeListener

void removeListener(ServerChannel.ServerChannelListener listener)
Parameters:
listener - the listener to remove
See Also:
#addListener(ServerChannelListener)

getListeners

List<ServerChannel.ServerChannelListener> getListeners()
Returns:
an immutable list of listeners
See Also:
#addListener(ServerChannelListener)

isLazy

boolean isLazy()
Returns:
whether the channel is lazy
See Also:
setLazy(boolean)

setLazy

void setLazy(boolean lazy)
A lazy channel marks all messages published to it as lazy.

Parameters:
lazy - whether the channel is lazy
See Also:
isLazy()

isPersistent

boolean isPersistent()
Returns:
whether the channel is persistent
See Also:
setPersistent(boolean)

setPersistent

void setPersistent(boolean persistent)
A persistent channel is not removed when the last subscription is removed

Parameters:
persistent - whether the channel is persistent
See Also:
isPersistent()

addAuthorizer

void addAuthorizer(Authorizer authorizer)

Adds the given Authorizer that grants or denies operations on this channel.

Operations must be granted by at least one Authorizer and must not be denied by any.

Parameters:
authorizer - the Authorizer to add
See Also:
removeAuthorizer(Authorizer), Authorizer

removeAuthorizer

void removeAuthorizer(Authorizer authorizer)

Removes the given Authorizer.

Parameters:
authorizer - the Authorizer to remove
See Also:
addAuthorizer(Authorizer)

getAuthorizers

List<Authorizer> getAuthorizers()
Returns:
an immutable list of authorizers for this channel


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