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.MessageListener
Nested 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, SERVICE
Fields inherited from interface org.eclipse.jetty.util.component.Dumpable
KEY
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractSessionChannel(org.cometd.bayeux.ChannelId id)
-
Method Summary
Modifier and Type Method Description void
addListener(ClientSessionChannel.ClientSessionChannelListener listener)
void
dump(java.lang.Appendable out, java.lang.String indent)
java.lang.String
dumpSelf()
java.lang.Object
getAttribute(java.lang.String name)
java.util.Set<java.lang.String>
getAttributeNames()
org.cometd.bayeux.ChannelId
getChannelId()
java.lang.String
getId()
java.util.List<ClientSessionChannel.ClientSessionChannelListener>
getListeners()
java.util.List<ClientSessionChannel.MessageListener>
getSubscribers()
boolean
isBroadcast()
boolean
isDeepWild()
boolean
isMeta()
boolean
isReleased()
boolean
isService()
boolean
isWild()
protected void
nonFirstSubscribe(org.cometd.bayeux.Message.Mutable message, ClientSessionChannel.MessageListener listener, ClientSession.MessageListener callback)
protected void
nonLastUnSubscribe(org.cometd.bayeux.Message.Mutable message, ClientSessionChannel.MessageListener listener, ClientSession.MessageListener callback)
protected void
notifyMessageListeners(org.cometd.bayeux.Message message)
protected void
notifyOnMessage(ClientSessionChannel.MessageListener listener, org.cometd.bayeux.Message message)
void
publish(java.lang.Object data, ClientSession.MessageListener callback)
void
publish(org.cometd.bayeux.Message.Mutable message, ClientSession.MessageListener callback)
boolean
release()
java.lang.Object
removeAttribute(java.lang.String name)
void
removeListener(ClientSessionChannel.ClientSessionChannelListener listener)
protected void
resetSubscriptions()
protected void
sendSubscribe(org.cometd.bayeux.Message.Mutable message, ClientSessionChannel.MessageListener listener, ClientSession.MessageListener callback)
protected void
sendUnSubscribe(org.cometd.bayeux.Message.Mutable message, ClientSession.MessageListener callback)
Deprecated.protected void
sendUnSubscribe(org.cometd.bayeux.Message.Mutable message, ClientSessionChannel.MessageListener listener, ClientSession.MessageListener callback)
void
setAttribute(java.lang.String name, java.lang.Object value)
boolean
subscribe(org.cometd.bayeux.Message.Mutable message, ClientSessionChannel.MessageListener listener, ClientSession.MessageListener callback)
protected void
throwIfReleased()
java.lang.String
toString()
void
unsubscribe()
boolean
unsubscribe(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, wait
Methods inherited from interface org.cometd.bayeux.client.ClientSessionChannel
getSession, publish, subscribe, subscribe, unsubscribe, unsubscribe
Methods 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:
getChannelId
in interfaceorg.cometd.bayeux.Channel
-
addListener
- Specified by:
addListener
in interfaceClientSessionChannel
-
removeListener
- Specified by:
removeListener
in interfaceClientSessionChannel
-
getListeners
- Specified by:
getListeners
in interfaceClientSessionChannel
-
publish
- Specified by:
publish
in interfaceClientSessionChannel
-
publish
public void publish(org.cometd.bayeux.Message.Mutable message, ClientSession.MessageListener callback)- Specified by:
publish
in interfaceClientSessionChannel
-
subscribe
public boolean subscribe(org.cometd.bayeux.Message.Mutable message, ClientSessionChannel.MessageListener listener, ClientSession.MessageListener callback)- Specified by:
subscribe
in 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:
unsubscribe
in 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:
unsubscribe
in interfaceClientSessionChannel
-
getSubscribers
- Specified by:
getSubscribers
in interfaceClientSessionChannel
-
release
public boolean release()- Specified by:
release
in interfaceClientSessionChannel
-
isReleased
public boolean isReleased()- Specified by:
isReleased
in interfaceClientSessionChannel
-
resetSubscriptions
protected void resetSubscriptions() -
getId
public java.lang.String getId()- Specified by:
getId
in interfaceorg.cometd.bayeux.Channel
-
isDeepWild
public boolean isDeepWild()- Specified by:
isDeepWild
in interfaceorg.cometd.bayeux.Channel
-
isMeta
public boolean isMeta()- Specified by:
isMeta
in interfaceorg.cometd.bayeux.Channel
-
isService
public boolean isService()- Specified by:
isService
in interfaceorg.cometd.bayeux.Channel
-
isBroadcast
public boolean isBroadcast()- Specified by:
isBroadcast
in interfaceorg.cometd.bayeux.Channel
-
isWild
public boolean isWild()- Specified by:
isWild
in 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:
setAttribute
in interfaceorg.cometd.bayeux.Channel
-
getAttribute
public java.lang.Object getAttribute(java.lang.String name)- Specified by:
getAttribute
in interfaceorg.cometd.bayeux.Channel
-
getAttributeNames
public java.util.Set<java.lang.String> getAttributeNames()- Specified by:
getAttributeNames
in interfaceorg.cometd.bayeux.Channel
-
removeAttribute
public java.lang.Object removeAttribute(java.lang.String name)- Specified by:
removeAttribute
in interfaceorg.cometd.bayeux.Channel
-
throwIfReleased
protected void throwIfReleased() -
dumpSelf
public java.lang.String dumpSelf()- Specified by:
dumpSelf
in interfaceorg.eclipse.jetty.util.component.Dumpable
-
dump
public void dump(java.lang.Appendable out, java.lang.String indent) throws java.io.IOException- Specified by:
dump
in interfaceorg.eclipse.jetty.util.component.Dumpable
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-