org.cometd.common
Class AbstractClientSession.AbstractSessionChannel

java.lang.Object
  extended by org.cometd.common.AbstractClientSession.AbstractSessionChannel
All Implemented Interfaces:
Channel, ClientSessionChannel
Enclosing class:
AbstractClientSession

protected abstract static class AbstractClientSession.AbstractSessionChannel
extends Object
implements ClientSessionChannel

A channel scoped to a ClientSession.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.cometd.bayeux.client.ClientSessionChannel
ClientSessionChannel.ClientSessionChannelListener, ClientSessionChannel.MessageListener
 
Field Summary
protected  org.eclipse.jetty.util.log.Logger logger
           
 
Fields inherited from interface org.cometd.bayeux.Channel
META, META_CONNECT, META_DISCONNECT, META_HANDSHAKE, META_SUBSCRIBE, META_UNSUBSCRIBE
 
Constructor Summary
protected AbstractClientSession.AbstractSessionChannel(ChannelId id)
           
 
Method Summary
 void addListener(ClientSessionChannel.ClientSessionChannelListener listener)
           
protected  void dump(StringBuilder b, String indent)
           
 Object getAttribute(String name)
           
 Set<String> getAttributeNames()
           
 ChannelId getChannelId()
           
 String getId()
           
 boolean isDeepWild()
           
 boolean isMeta()
           
 boolean isService()
           
 boolean isWild()
           
protected  void notifyMessageListeners(Message message)
           
 Object removeAttribute(String name)
           
 void removeListener(ClientSessionChannel.ClientSessionChannelListener listener)
           
protected  void resetSubscriptions()
           
protected abstract  void sendSubscribe()
           
protected abstract  void sendUnSubscribe()
           
 void setAttribute(String name, Object value)
           
 void subscribe(ClientSessionChannel.MessageListener listener)
           
 String toString()
           
 void unsubscribe()
           
 void unsubscribe(ClientSessionChannel.MessageListener listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.cometd.bayeux.client.ClientSessionChannel
getSession, publish, publish
 

Field Detail

logger

protected final org.eclipse.jetty.util.log.Logger logger
Constructor Detail

AbstractClientSession.AbstractSessionChannel

protected AbstractClientSession.AbstractSessionChannel(ChannelId id)
Method Detail

getChannelId

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

addListener

public void addListener(ClientSessionChannel.ClientSessionChannelListener listener)
Specified by:
addListener in interface ClientSessionChannel

removeListener

public void removeListener(ClientSessionChannel.ClientSessionChannelListener listener)
Specified by:
removeListener in interface ClientSessionChannel

sendSubscribe

protected abstract void sendSubscribe()

sendUnSubscribe

protected abstract void sendUnSubscribe()

subscribe

public void subscribe(ClientSessionChannel.MessageListener listener)
Specified by:
subscribe in interface ClientSessionChannel

unsubscribe

public void unsubscribe(ClientSessionChannel.MessageListener listener)
Specified by:
unsubscribe in interface ClientSessionChannel

unsubscribe

public void unsubscribe()
Specified by:
unsubscribe in interface ClientSessionChannel

resetSubscriptions

protected void resetSubscriptions()

getId

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

isDeepWild

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

isMeta

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

isService

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

isWild

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

notifyMessageListeners

protected void notifyMessageListeners(Message message)

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)

toString

public String toString()
Overrides:
toString in class Object


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