org.cometd.server
Class ServerChannelImpl

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

public class ServerChannelImpl
extends java.lang.Object
implements ServerChannel


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.cometd.bayeux.server.ServerChannel
ServerChannel.MessageListener, ServerChannel.ServerChannelListener, ServerChannel.SubscriptionListener
 
Field Summary
 
Fields inherited from interface org.cometd.bayeux.Channel
META_CONNECT, META_DISCONNECT, META_HANDSHAKE, META_SUBSCRIBE, META_UNSUBSCRIBE
 
Constructor Summary
protected ServerChannelImpl(BayeuxServerImpl bayeux, ServerChannelImpl parent, ChannelId id)
           
 
Method Summary
 void addListener(ServerChannel.ServerChannelListener listener)
           
protected  void doSweep()
           
protected  void dump(java.lang.StringBuilder b, java.lang.String indent)
           
 ChannelId getChannelId()
           
 ServerChannelImpl getChild(ChannelId id, boolean create)
           
 java.lang.String getId()
           
 java.util.Set<? extends ServerSession> getSubscribers()
           
 boolean isBroadcast()
           
 boolean isDeepWild()
           
 boolean isLazy()
           
 boolean isMeta()
           
 boolean isPersistent()
           
 boolean isService()
           
 boolean isWild()
           
 void publish(Session from, java.lang.Object data, java.lang.Object 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)
           
 java.lang.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,
                            ServerChannelImpl parent,
                            ChannelId id)
Method Detail

subscribe

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

unsubscribe

protected void unsubscribe(ServerSessionImpl session)

getSubscribers

public java.util.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 ServerChannel

isPersistent

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

isWild

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

setLazy

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

setPersistent

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

addListener

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

getChannelId

public ChannelId getChannelId()

getId

public java.lang.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 ServerChannel

getChild

public ServerChannelImpl getChild(ChannelId id,
                                  boolean create)

publish

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

publish

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

doSweep

protected void doSweep()

remove

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

dump

protected void dump(java.lang.StringBuilder b,
                    java.lang.String indent)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2010 Dojo Foundation. All Rights Reserved.