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, ConfigurableServerChannel


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)
           
 
Method Summary
 void addListener(ServerChannel.ServerChannelListener listener)
           
protected  void doSweep(int children)
           
protected  void dump(StringBuilder b, String indent)
           
 ChannelId getChannelId()
           
 String getId()
           
 List<ServerChannel.ServerChannelListener> getListeners()
           
 Set<? extends 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 msg)
           
 void remove()
           
 void removeListener(ServerChannel.ServerChannelListener listener)
           
 void setLazy(boolean lazy)
           
 void setPersistent(boolean persistent)
           
protected  boolean subscribe(ServerSessionImpl session)
           
 String toString()
           
protected  void unsubscribe(ServerSessionImpl 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)
Method Detail

subscribe

protected boolean subscribe(ServerSessionImpl session)
Parameters:
session -
Returns:
true if the subscribe succeeded.

unsubscribe

protected void unsubscribe(ServerSessionImpl session)

getListeners

public List<ServerChannel.ServerChannelListener> getListeners()

getSubscribers

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

isBroadcast

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

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

getChannelId

public ChannelId getChannelId()

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

removeListener

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

publish

public void publish(Session from,
                    ServerMessage msg)
Specified by:
publish in interface ServerChannel

publish

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

doSweep

protected void doSweep(int children)

remove

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

dump

protected void dump(StringBuilder b,
                    String indent)

toString

public String toString()
Overrides:
toString in class Object


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