Package org.cometd.common
Class AbstractClientSession.AbstractSessionChannel
java.lang.Object
org.cometd.common.AbstractClientSession.AbstractSessionChannel
- All Implemented Interfaces:
org.cometd.bayeux.Channel
,org.cometd.bayeux.client.ClientSessionChannel
,org.eclipse.jetty.util.component.Dumpable
- Enclosing class:
- AbstractClientSession
protected abstract class AbstractClientSession.AbstractSessionChannel extends Object implements org.cometd.bayeux.client.ClientSessionChannel, org.eclipse.jetty.util.component.Dumpable
A channel scoped to a ClientSession
.
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractSessionChannel(org.cometd.bayeux.ChannelId id)
-
Method Summary
Modifier and Type Method Description void
addListener(org.cometd.bayeux.client.ClientSessionChannel.ClientSessionChannelListener listener)
void
dump(Appendable out, String indent)
String
dumpSelf()
Object
getAttribute(String name)
Set<String>
getAttributeNames()
org.cometd.bayeux.ChannelId
getChannelId()
String
getId()
List<org.cometd.bayeux.client.ClientSessionChannel.ClientSessionChannelListener>
getListeners()
List<org.cometd.bayeux.client.ClientSessionChannel.MessageListener>
getSubscribers()
boolean
isBroadcast()
boolean
isDeepWild()
boolean
isMeta()
boolean
isReleased()
boolean
isService()
boolean
isWild()
protected void
notifyMessageListeners(org.cometd.bayeux.Message message)
protected void
notifyOnMessage(org.cometd.bayeux.client.ClientSessionChannel.MessageListener listener, org.cometd.bayeux.Message message)
void
publish(Object data, org.cometd.bayeux.client.ClientSession.MessageListener callback)
void
publish(org.cometd.bayeux.Message.Mutable message, org.cometd.bayeux.client.ClientSession.MessageListener callback)
boolean
release()
Object
removeAttribute(String name)
void
removeListener(org.cometd.bayeux.client.ClientSessionChannel.ClientSessionChannelListener listener)
protected void
resetSubscriptions()
protected void
sendSubscribe(org.cometd.bayeux.Message.Mutable message, org.cometd.bayeux.client.ClientSessionChannel.MessageListener listener, org.cometd.bayeux.client.ClientSession.MessageListener callback)
protected void
sendUnSubscribe(org.cometd.bayeux.Message.Mutable message, org.cometd.bayeux.client.ClientSession.MessageListener callback)
void
setAttribute(String name, Object value)
boolean
subscribe(org.cometd.bayeux.Message.Mutable message, org.cometd.bayeux.client.ClientSessionChannel.MessageListener listener, org.cometd.bayeux.client.ClientSession.MessageListener callback)
protected void
throwIfReleased()
String
toString()
void
unsubscribe()
boolean
unsubscribe(org.cometd.bayeux.Message.Mutable message, org.cometd.bayeux.client.ClientSessionChannel.MessageListener listener, org.cometd.bayeux.client.ClientSession.MessageListener callback)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
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
public void addListener(org.cometd.bayeux.client.ClientSessionChannel.ClientSessionChannelListener listener)- Specified by:
addListener
in interfaceorg.cometd.bayeux.client.ClientSessionChannel
-
removeListener
public void removeListener(org.cometd.bayeux.client.ClientSessionChannel.ClientSessionChannelListener listener)- Specified by:
removeListener
in interfaceorg.cometd.bayeux.client.ClientSessionChannel
-
getListeners
public List<org.cometd.bayeux.client.ClientSessionChannel.ClientSessionChannelListener> getListeners()- Specified by:
getListeners
in interfaceorg.cometd.bayeux.client.ClientSessionChannel
-
publish
- Specified by:
publish
in interfaceorg.cometd.bayeux.client.ClientSessionChannel
-
publish
public void publish(org.cometd.bayeux.Message.Mutable message, org.cometd.bayeux.client.ClientSession.MessageListener callback)- Specified by:
publish
in interfaceorg.cometd.bayeux.client.ClientSessionChannel
-
subscribe
public boolean subscribe(org.cometd.bayeux.Message.Mutable message, org.cometd.bayeux.client.ClientSessionChannel.MessageListener listener, org.cometd.bayeux.client.ClientSession.MessageListener callback)- Specified by:
subscribe
in interfaceorg.cometd.bayeux.client.ClientSessionChannel
-
sendSubscribe
protected void sendSubscribe(org.cometd.bayeux.Message.Mutable message, org.cometd.bayeux.client.ClientSessionChannel.MessageListener listener, org.cometd.bayeux.client.ClientSession.MessageListener callback) -
unsubscribe
public boolean unsubscribe(org.cometd.bayeux.Message.Mutable message, org.cometd.bayeux.client.ClientSessionChannel.MessageListener listener, org.cometd.bayeux.client.ClientSession.MessageListener callback)- Specified by:
unsubscribe
in interfaceorg.cometd.bayeux.client.ClientSessionChannel
-
sendUnSubscribe
protected void sendUnSubscribe(org.cometd.bayeux.Message.Mutable message, org.cometd.bayeux.client.ClientSession.MessageListener callback) -
unsubscribe
public void unsubscribe()- Specified by:
unsubscribe
in interfaceorg.cometd.bayeux.client.ClientSessionChannel
-
getSubscribers
- Specified by:
getSubscribers
in interfaceorg.cometd.bayeux.client.ClientSessionChannel
-
release
public boolean release()- Specified by:
release
in interfaceorg.cometd.bayeux.client.ClientSessionChannel
-
isReleased
public boolean isReleased()- Specified by:
isReleased
in interfaceorg.cometd.bayeux.client.ClientSessionChannel
-
resetSubscriptions
protected void resetSubscriptions() -
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(org.cometd.bayeux.client.ClientSessionChannel.MessageListener listener, org.cometd.bayeux.Message message) -
setAttribute
- Specified by:
setAttribute
in interfaceorg.cometd.bayeux.Channel
-
getAttribute
- Specified by:
getAttribute
in interfaceorg.cometd.bayeux.Channel
-
getAttributeNames
- Specified by:
getAttributeNames
in interfaceorg.cometd.bayeux.Channel
-
removeAttribute
- Specified by:
removeAttribute
in interfaceorg.cometd.bayeux.Channel
-
throwIfReleased
protected void throwIfReleased() -
dumpSelf
- Specified by:
dumpSelf
in interfaceorg.eclipse.jetty.util.component.Dumpable
-
dump
- Specified by:
dump
in interfaceorg.eclipse.jetty.util.component.Dumpable
- Throws:
IOException
-
toString
-