Package org.cometd.common
Class AbstractClientSession.AbstractSessionChannel
java.lang.Object
org.cometd.common.AbstractClientSession.AbstractSessionChannel
- All Implemented Interfaces:
org.cometd.bayeux.Channel,ClientSessionChannel,org.eclipse.jetty.util.component.Dumpable
- Enclosing class:
- AbstractClientSession
protected abstract class AbstractClientSession.AbstractSessionChannel extends java.lang.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.MessageListenerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
org.eclipse.jetty.util.component.Dumpable.DumpableContainer -
Field Summary
Fields inherited from interface org.cometd.bayeux.Channel
META, META_CONNECT, META_DISCONNECT, META_HANDSHAKE, META_SUBSCRIBE, META_UNSUBSCRIBE, SERVICEFields inherited from interface org.eclipse.jetty.util.component.Dumpable
KEY -
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractSessionChannel(org.cometd.bayeux.ChannelId id) -
Method Summary
Modifier and Type Method Description voidaddListener(ClientSessionChannel.ClientSessionChannelListener listener)voiddump(java.lang.Appendable out, java.lang.String indent)java.lang.StringdumpSelf()java.lang.ObjectgetAttribute(java.lang.String name)java.util.Set<java.lang.String>getAttributeNames()org.cometd.bayeux.ChannelIdgetChannelId()java.lang.StringgetId()java.util.List<ClientSessionChannel.ClientSessionChannelListener>getListeners()java.util.List<ClientSessionChannel.MessageListener>getSubscribers()booleanisBroadcast()booleanisDeepWild()booleanisMeta()booleanisReleased()booleanisService()booleanisWild()protected voidnonFirstSubscribe(org.cometd.bayeux.Message.Mutable message, ClientSessionChannel.MessageListener listener, ClientSession.MessageListener callback)protected voidnonLastUnSubscribe(org.cometd.bayeux.Message.Mutable message, ClientSessionChannel.MessageListener listener, ClientSession.MessageListener callback)protected voidnotifyMessageListeners(org.cometd.bayeux.Message message)protected voidnotifyOnMessage(ClientSessionChannel.MessageListener listener, org.cometd.bayeux.Message message)voidpublish(java.lang.Object data, ClientSession.MessageListener callback)voidpublish(org.cometd.bayeux.Message.Mutable message, ClientSession.MessageListener callback)booleanrelease()java.lang.ObjectremoveAttribute(java.lang.String name)voidremoveListener(ClientSessionChannel.ClientSessionChannelListener listener)protected voidresetSubscriptions()protected voidsendSubscribe(org.cometd.bayeux.Message.Mutable message, ClientSessionChannel.MessageListener listener, ClientSession.MessageListener callback)protected voidsendUnSubscribe(org.cometd.bayeux.Message.Mutable message, ClientSession.MessageListener callback)Deprecated.protected voidsendUnSubscribe(org.cometd.bayeux.Message.Mutable message, ClientSessionChannel.MessageListener listener, ClientSession.MessageListener callback)voidsetAttribute(java.lang.String name, java.lang.Object value)booleansubscribe(org.cometd.bayeux.Message.Mutable message, ClientSessionChannel.MessageListener listener, ClientSession.MessageListener callback)protected voidthrowIfReleased()java.lang.StringtoString()voidunsubscribe()booleanunsubscribe(org.cometd.bayeux.Message.Mutable message, ClientSessionChannel.MessageListener listener, ClientSession.MessageListener callback)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.cometd.bayeux.client.ClientSessionChannel
getSession, publish, subscribe, subscribe, unsubscribe, unsubscribeMethods inherited from interface org.eclipse.jetty.util.component.Dumpable
dump
-
Constructor Details
-
AbstractSessionChannel
protected AbstractSessionChannel(org.cometd.bayeux.ChannelId id)
-
-
Method Details
-
getChannelId
public org.cometd.bayeux.ChannelId getChannelId()- Specified by:
getChannelIdin interfaceorg.cometd.bayeux.Channel
-
addListener
- Specified by:
addListenerin interfaceClientSessionChannel
-
removeListener
- Specified by:
removeListenerin interfaceClientSessionChannel
-
getListeners
- Specified by:
getListenersin interfaceClientSessionChannel
-
publish
- Specified by:
publishin interfaceClientSessionChannel
-
publish
public void publish(org.cometd.bayeux.Message.Mutable message, ClientSession.MessageListener callback)- Specified by:
publishin interfaceClientSessionChannel
-
subscribe
public boolean subscribe(org.cometd.bayeux.Message.Mutable message, ClientSessionChannel.MessageListener listener, ClientSession.MessageListener callback)- Specified by:
subscribein interfaceClientSessionChannel
-
sendSubscribe
protected void sendSubscribe(org.cometd.bayeux.Message.Mutable message, ClientSessionChannel.MessageListener listener, ClientSession.MessageListener callback) -
nonFirstSubscribe
protected void nonFirstSubscribe(org.cometd.bayeux.Message.Mutable message, ClientSessionChannel.MessageListener listener, ClientSession.MessageListener callback) -
unsubscribe
public boolean unsubscribe(org.cometd.bayeux.Message.Mutable message, ClientSessionChannel.MessageListener listener, ClientSession.MessageListener callback)- Specified by:
unsubscribein interfaceClientSessionChannel
-
sendUnSubscribe
protected void sendUnSubscribe(org.cometd.bayeux.Message.Mutable message, ClientSessionChannel.MessageListener listener, ClientSession.MessageListener callback) -
sendUnSubscribe
@Deprecated protected void sendUnSubscribe(org.cometd.bayeux.Message.Mutable message, ClientSession.MessageListener callback)Deprecated. -
nonLastUnSubscribe
protected void nonLastUnSubscribe(org.cometd.bayeux.Message.Mutable message, ClientSessionChannel.MessageListener listener, ClientSession.MessageListener callback) -
unsubscribe
public void unsubscribe()- Specified by:
unsubscribein interfaceClientSessionChannel
-
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() -
getId
public java.lang.String getId()- Specified by:
getIdin interfaceorg.cometd.bayeux.Channel
-
isDeepWild
public boolean isDeepWild()- Specified by:
isDeepWildin interfaceorg.cometd.bayeux.Channel
-
isMeta
public boolean isMeta()- Specified by:
isMetain interfaceorg.cometd.bayeux.Channel
-
isService
public boolean isService()- Specified by:
isServicein interfaceorg.cometd.bayeux.Channel
-
isBroadcast
public boolean isBroadcast()- Specified by:
isBroadcastin interfaceorg.cometd.bayeux.Channel
-
isWild
public boolean isWild()- Specified by:
isWildin interfaceorg.cometd.bayeux.Channel
-
notifyMessageListeners
protected void notifyMessageListeners(org.cometd.bayeux.Message message) -
notifyOnMessage
protected void notifyOnMessage(ClientSessionChannel.MessageListener listener, org.cometd.bayeux.Message message) -
setAttribute
public void setAttribute(java.lang.String name, java.lang.Object value)- Specified by:
setAttributein interfaceorg.cometd.bayeux.Channel
-
getAttribute
public java.lang.Object getAttribute(java.lang.String name)- Specified by:
getAttributein interfaceorg.cometd.bayeux.Channel
-
getAttributeNames
public java.util.Set<java.lang.String> getAttributeNames()- Specified by:
getAttributeNamesin interfaceorg.cometd.bayeux.Channel
-
removeAttribute
public java.lang.Object removeAttribute(java.lang.String name)- Specified by:
removeAttributein interfaceorg.cometd.bayeux.Channel
-
throwIfReleased
protected void throwIfReleased() -
dumpSelf
public java.lang.String dumpSelf()- Specified by:
dumpSelfin interfaceorg.eclipse.jetty.util.component.Dumpable
-
dump
public void dump(java.lang.Appendable out, java.lang.String indent) throws java.io.IOException- Specified by:
dumpin interfaceorg.eclipse.jetty.util.component.Dumpable- Throws:
java.io.IOException
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-