org.cometd.server
Class ServerChannelImpl

java.lang.Object
  extended by org.cometd.server.ServerChannelImpl
All Implemented Interfaces:
Channel, ConfigurableServerChannel, ServerChannel

public class ServerChannelImpl
extends Object
implements ServerChannel


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.cometd.bayeux.server.ServerChannel
ServerChannel.MessageListener, ServerChannel.ServerChannelListener, ServerChannel.SubscriptionListener
 
Nested classes/interfaces inherited from interface org.cometd.bayeux.server.ConfigurableServerChannel
ConfigurableServerChannel.Initializer
 
Field Summary
 
Fields inherited from interface org.cometd.bayeux.Channel
META, META_CONNECT, META_DISCONNECT, META_HANDSHAKE, META_SUBSCRIBE, META_UNSUBSCRIBE
 
Constructor Summary
protected ServerChannelImpl(BayeuxServerImpl bayeux, ChannelId id, ServerChannelImpl parent)
           
 
Method Summary
 void addAuthorizer(Authorizer authorizer)
           
 void addListener(ServerChannel.ServerChannelListener listener)
           
protected  void dump(StringBuilder b, String indent)
           
 Object getAttribute(String name)
           
 Set<String> getAttributeNames()
           
 List<Authorizer> getAuthorizers()
           
 ChannelId getChannelId()
           
 String getId()
           
 List<ServerChannel.ServerChannelListener> getListeners()
           
 Set<ServerSession> getSubscribers()
           
 boolean isBroadcast()
           
 boolean isDeepWild()
           
 boolean isLazy()
           
 boolean isMeta()
           
 boolean isPersistent()
           
 boolean isService()
           
 boolean isWild()
           
 void publish(Session from, Object data, String id)
           
 void publish(Session from, ServerMessage.Mutable mutable)
           
 void remove()
           
 Object removeAttribute(String name)
           
 void removeAuthorizer(Authorizer authorizer)
           
 void removeListener(ServerChannel.ServerChannelListener listener)
           
 void setAttribute(String name, Object value)
           
 void setLazy(boolean lazy)
           
 void setPersistent(boolean persistent)
           
 boolean subscribe(ServerSession session)
           
protected  void sweep()
           
 String toString()
           
 boolean unsubscribe(ServerSession session)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServerChannelImpl

protected ServerChannelImpl(BayeuxServerImpl bayeux,
                            ChannelId id,
                            ServerChannelImpl parent)
Method Detail

subscribe

public boolean subscribe(ServerSession session)
Specified by:
subscribe in interface ServerChannel

unsubscribe

public boolean unsubscribe(ServerSession session)
Specified by:
unsubscribe in interface ServerChannel

getSubscribers

public Set<ServerSession> getSubscribers()
Specified by:
getSubscribers in interface ServerChannel

isBroadcast

public boolean isBroadcast()
Specified by:
isBroadcast in interface Channel

isDeepWild

public boolean isDeepWild()
Specified by:
isDeepWild in interface Channel

isLazy

public boolean isLazy()
Specified by:
isLazy in interface ConfigurableServerChannel

isPersistent

public boolean isPersistent()
Specified by:
isPersistent in interface ConfigurableServerChannel

isWild

public boolean isWild()
Specified by:
isWild in interface Channel

setLazy

public void setLazy(boolean lazy)
Specified by:
setLazy in interface ConfigurableServerChannel

setPersistent

public void setPersistent(boolean persistent)
Specified by:
setPersistent in interface ConfigurableServerChannel

addListener

public void addListener(ServerChannel.ServerChannelListener listener)
Specified by:
addListener in interface ConfigurableServerChannel

removeListener

public void removeListener(ServerChannel.ServerChannelListener listener)
Specified by:
removeListener in interface ConfigurableServerChannel

getListeners

public List<ServerChannel.ServerChannelListener> getListeners()
Specified by:
getListeners in interface ConfigurableServerChannel

getChannelId

public ChannelId getChannelId()
Specified by:
getChannelId in interface Channel

getId

public String getId()
Specified by:
getId in interface Channel

isMeta

public boolean isMeta()
Specified by:
isMeta in interface Channel

isService

public boolean isService()
Specified by:
isService in interface Channel

publish

public void publish(Session from,
                    ServerMessage.Mutable mutable)
Specified by:
publish in interface ServerChannel

publish

public void publish(Session from,
                    Object data,
                    String id)
Specified by:
publish in interface ServerChannel

sweep

protected void sweep()

remove

public void remove()
Specified by:
remove in interface ServerChannel

setAttribute

public void setAttribute(String name,
                         Object value)
Specified by:
setAttribute in interface Channel

getAttribute

public Object getAttribute(String name)
Specified by:
getAttribute in interface Channel

getAttributeNames

public Set<String> getAttributeNames()
Specified by:
getAttributeNames in interface Channel

removeAttribute

public Object removeAttribute(String name)
Specified by:
removeAttribute in interface Channel

dump

protected void dump(StringBuilder b,
                    String indent)

addAuthorizer

public void addAuthorizer(Authorizer authorizer)
Specified by:
addAuthorizer in interface ConfigurableServerChannel

removeAuthorizer

public void removeAuthorizer(Authorizer authorizer)
Specified by:
removeAuthorizer in interface ConfigurableServerChannel

getAuthorizers

public List<Authorizer> getAuthorizers()
Specified by:
getAuthorizers in interface ConfigurableServerChannel

toString

public String toString()
Overrides:
toString in class Object


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