protected abstract class AbstractClientSession.AbstractSessionChannel extends Object implements ClientSessionChannel, org.eclipse.jetty.util.component.Dumpable
A channel scoped to a ClientSession
.
ClientSessionChannel.ClientSessionChannelListener, ClientSessionChannel.MessageListener
Modifier | Constructor and Description |
---|---|
protected |
AbstractSessionChannel(org.cometd.bayeux.ChannelId id) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getSession, publish, subscribe, subscribe, unsubscribe, unsubscribe
protected AbstractSessionChannel(org.cometd.bayeux.ChannelId id)
public org.cometd.bayeux.ChannelId getChannelId()
getChannelId
in interface org.cometd.bayeux.Channel
public void addListener(ClientSessionChannel.ClientSessionChannelListener listener)
addListener
in interface ClientSessionChannel
public void removeListener(ClientSessionChannel.ClientSessionChannelListener listener)
removeListener
in interface ClientSessionChannel
public List<ClientSessionChannel.ClientSessionChannelListener> getListeners()
getListeners
in interface ClientSessionChannel
public void publish(Object data, ClientSession.MessageListener callback)
publish
in interface ClientSessionChannel
public void publish(org.cometd.bayeux.Message.Mutable message, ClientSession.MessageListener callback)
publish
in interface ClientSessionChannel
public boolean subscribe(org.cometd.bayeux.Message.Mutable message, ClientSessionChannel.MessageListener listener, ClientSession.MessageListener callback)
subscribe
in interface ClientSessionChannel
protected void sendSubscribe(org.cometd.bayeux.Message.Mutable message, ClientSessionChannel.MessageListener listener, ClientSession.MessageListener callback)
protected void nonFirstSubscribe(org.cometd.bayeux.Message.Mutable message, ClientSessionChannel.MessageListener listener, ClientSession.MessageListener callback)
public boolean unsubscribe(org.cometd.bayeux.Message.Mutable message, ClientSessionChannel.MessageListener listener, ClientSession.MessageListener callback)
unsubscribe
in interface ClientSessionChannel
protected void sendUnSubscribe(org.cometd.bayeux.Message.Mutable message, ClientSessionChannel.MessageListener listener, ClientSession.MessageListener callback)
@Deprecated protected void sendUnSubscribe(org.cometd.bayeux.Message.Mutable message, ClientSession.MessageListener callback)
protected void nonLastUnSubscribe(org.cometd.bayeux.Message.Mutable message, ClientSessionChannel.MessageListener listener, ClientSession.MessageListener callback)
public void unsubscribe()
unsubscribe
in interface ClientSessionChannel
public List<ClientSessionChannel.MessageListener> getSubscribers()
getSubscribers
in interface ClientSessionChannel
public boolean release()
release
in interface ClientSessionChannel
public boolean isReleased()
isReleased
in interface ClientSessionChannel
protected void resetSubscriptions()
public String getId()
getId
in interface org.cometd.bayeux.Channel
public boolean isDeepWild()
isDeepWild
in interface org.cometd.bayeux.Channel
public boolean isMeta()
isMeta
in interface org.cometd.bayeux.Channel
public boolean isService()
isService
in interface org.cometd.bayeux.Channel
public boolean isBroadcast()
isBroadcast
in interface org.cometd.bayeux.Channel
public boolean isWild()
isWild
in interface org.cometd.bayeux.Channel
protected void notifyMessageListeners(org.cometd.bayeux.Message message)
protected void notifyOnMessage(ClientSessionChannel.MessageListener listener, org.cometd.bayeux.Message message)
public void setAttribute(String name, Object value)
setAttribute
in interface org.cometd.bayeux.Channel
public Object getAttribute(String name)
getAttribute
in interface org.cometd.bayeux.Channel
public Set<String> getAttributeNames()
getAttributeNames
in interface org.cometd.bayeux.Channel
public Object removeAttribute(String name)
removeAttribute
in interface org.cometd.bayeux.Channel
protected void throwIfReleased()
public String dumpSelf()
dumpSelf
in interface org.eclipse.jetty.util.component.Dumpable
public void dump(Appendable out, String indent) throws IOException
dump
in interface org.eclipse.jetty.util.component.Dumpable
IOException
Copyright © 2008–2023 The CometD Project. All rights reserved.