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 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
 
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()
           
 List<ClientSessionChannel.ClientSessionChannelListener> getListeners()
           
 List<ClientSessionChannel.MessageListener> getSubscribers()
           
 boolean isBroadcast()
           
 boolean isDeepWild()
           
 boolean isMeta()
           
 boolean isReleased()
           
 boolean isService()
           
 boolean isWild()
           
protected  void notifyMessageListeners(Message message)
           
 boolean release()
           
 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)
           
protected  void throwIfReleased()
           
 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
 

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

getListeners

public List<ClientSessionChannel.ClientSessionChannelListener> getListeners()
Specified by:
getListeners 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

getSubscribers

public List<ClientSessionChannel.MessageListener> getSubscribers()
Specified by:
getSubscribers in interface ClientSessionChannel

release

public boolean release()
Specified by:
release in interface ClientSessionChannel

isReleased

public boolean isReleased()
Specified by:
isReleased 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

isBroadcast

public boolean isBroadcast()
Specified by:
isBroadcast 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)

throwIfReleased

protected void throwIfReleased()

toString

public String toString()
Overrides:
toString in class Object


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