Package org.cometd.common
Class AbstractClientSession.AbstractSessionChannel
- java.lang.Object
-
- org.cometd.common.AbstractClientSession.AbstractSessionChannel
-
- All Implemented Interfaces:
Channel,ClientSessionChannel,org.eclipse.jetty.util.component.Dumpable
- Enclosing class:
- AbstractClientSession
protected abstract class AbstractClientSession.AbstractSessionChannel extends Object implements ClientSessionChannel, org.eclipse.jetty.util.component.Dumpable
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, SERVICE
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractSessionChannel(ChannelId id)
-
Method Summary
-
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, publish, subscribe, subscribe, subscribe, unsubscribe, unsubscribe, unsubscribe
-
-
-
-
Constructor Detail
-
AbstractSessionChannel
protected AbstractSessionChannel(ChannelId id)
-
-
Method Detail
-
getChannelId
public ChannelId getChannelId()
- Specified by:
getChannelIdin interfaceChannel
-
addListener
public void addListener(ClientSessionChannel.ClientSessionChannelListener listener)
- Specified by:
addListenerin interfaceClientSessionChannel
-
removeListener
public void removeListener(ClientSessionChannel.ClientSessionChannelListener listener)
- Specified by:
removeListenerin interfaceClientSessionChannel
-
getListeners
public List<ClientSessionChannel.ClientSessionChannelListener> getListeners()
- Specified by:
getListenersin interfaceClientSessionChannel
-
publish
public void publish(Object data, ClientSession.MessageListener callback)
- Specified by:
publishin interfaceClientSessionChannel
-
publish
public void publish(Message.Mutable message, ClientSession.MessageListener callback)
- Specified by:
publishin interfaceClientSessionChannel
-
subscribe
public boolean subscribe(Message.Mutable message, ClientSessionChannel.MessageListener listener, ClientSession.MessageListener callback)
- Specified by:
subscribein interfaceClientSessionChannel
-
sendSubscribe
protected void sendSubscribe(Message.Mutable message, ClientSessionChannel.MessageListener listener, ClientSession.MessageListener callback)
-
unsubscribe
public boolean unsubscribe(Message.Mutable message, ClientSessionChannel.MessageListener listener, ClientSession.MessageListener callback)
- Specified by:
unsubscribein interfaceClientSessionChannel
-
sendUnSubscribe
protected void sendUnSubscribe(Message.Mutable message, ClientSession.MessageListener callback)
-
unsubscribe
public void unsubscribe()
- Specified by:
unsubscribein interfaceClientSessionChannel
-
getSubscribers
public List<ClientSessionChannel.MessageListener> getSubscribers()
- Specified by:
getSubscribersin interfaceClientSessionChannel
-
release
public boolean release()
- Specified by:
releasein interfaceClientSessionChannel
-
isReleased
public boolean isReleased()
- Specified by:
isReleasedin interfaceClientSessionChannel
-
resetSubscriptions
protected void resetSubscriptions()
-
isDeepWild
public boolean isDeepWild()
- Specified by:
isDeepWildin interfaceChannel
-
isBroadcast
public boolean isBroadcast()
- Specified by:
isBroadcastin interfaceChannel
-
notifyMessageListeners
protected void notifyMessageListeners(Message message)
-
notifyOnMessage
protected void notifyOnMessage(ClientSessionChannel.MessageListener listener, Message message)
-
setAttribute
public void setAttribute(String name, Object value)
- Specified by:
setAttributein interfaceChannel
-
getAttribute
public Object getAttribute(String name)
- Specified by:
getAttributein interfaceChannel
-
getAttributeNames
public Set<String> getAttributeNames()
- Specified by:
getAttributeNamesin interfaceChannel
-
removeAttribute
public Object removeAttribute(String name)
- Specified by:
removeAttributein interfaceChannel
-
throwIfReleased
protected void throwIfReleased()
-
dumpSelf
public String dumpSelf()
- Specified by:
dumpSelfin interfaceorg.eclipse.jetty.util.component.Dumpable
-
dump
public void dump(Appendable out, String indent) throws IOException
- Specified by:
dumpin interfaceorg.eclipse.jetty.util.component.Dumpable- Throws:
IOException
-
-