org.cometd.common
Class AbstractClientSession.AbstractSessionChannel

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

protected abstract static class AbstractClientSession.AbstractSessionChannel
extends java.lang.Object
implements SessionChannel

A SessionChannel scoped to this LocalChannel


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.cometd.bayeux.client.SessionChannel
SessionChannel.MessageListener, SessionChannel.MetaChannelListener, SessionChannel.SessionChannelListener, SessionChannel.SubscriberListener
 
Field Summary
protected  AbstractClientSession.Handler _handler
           
protected  ChannelId _id
           
protected  java.util.concurrent.CopyOnWriteArrayList<SessionChannel.SessionChannelListener> _listeners
           
protected  java.util.concurrent.CopyOnWriteArrayList<SessionChannel.SubscriberListener> _subscriptions
           
 
Fields inherited from interface org.cometd.bayeux.Channel
META_CONNECT, META_DISCONNECT, META_HANDSHAKE, META_SUBSCRIBE, META_UNSUBSCRIBE
 
Constructor Summary
protected AbstractClientSession.AbstractSessionChannel(ChannelId id)
           
 
Method Summary
 void addListener(SessionChannel.SessionChannelListener listener)
           
 ChannelId getChannelId()
           
 java.lang.String getId()
           
 boolean isDeepWild()
           
 boolean isMeta()
           
 boolean isService()
           
 boolean isWild()
           
 void removeListener(SessionChannel.SessionChannelListener listener)
           
protected abstract  void sendSubscribe()
           
protected abstract  void sendUnSubscribe()
           
 void setHandler(AbstractClientSession.Handler handler)
           
 void subscribe(SessionChannel.SubscriberListener listener)
           
 java.lang.String toString()
           
 void unsubscribe()
           
 void unsubscribe(SessionChannel.SubscriberListener 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.SessionChannel
getSession, publish, publish
 

Field Detail

_id

protected final ChannelId _id

_subscriptions

protected java.util.concurrent.CopyOnWriteArrayList<SessionChannel.SubscriberListener> _subscriptions

_listeners

protected java.util.concurrent.CopyOnWriteArrayList<SessionChannel.SessionChannelListener> _listeners

_handler

protected AbstractClientSession.Handler _handler
Constructor Detail

AbstractClientSession.AbstractSessionChannel

protected AbstractClientSession.AbstractSessionChannel(ChannelId id)
Method Detail

getChannelId

public ChannelId getChannelId()

addListener

public void addListener(SessionChannel.SessionChannelListener listener)
Specified by:
addListener in interface SessionChannel

removeListener

public void removeListener(SessionChannel.SessionChannelListener listener)
Specified by:
removeListener in interface SessionChannel

sendSubscribe

protected abstract void sendSubscribe()

sendUnSubscribe

protected abstract void sendUnSubscribe()

subscribe

public void subscribe(SessionChannel.SubscriberListener listener)
Specified by:
subscribe in interface SessionChannel

unsubscribe

public void unsubscribe(SessionChannel.SubscriberListener listener)
Specified by:
unsubscribe in interface SessionChannel

unsubscribe

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

getId

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

setHandler

public void setHandler(AbstractClientSession.Handler handler)

toString

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


Copyright © 2010 Dojo Foundation. All Rights Reserved.