Package org.cometd.server
Class ServerChannelImpl
- java.lang.Object
-
- org.cometd.server.ServerChannelImpl
-
- All Implemented Interfaces:
Channel,ConfigurableServerChannel,ServerChannel,org.eclipse.jetty.util.component.Dumpable
public class ServerChannelImpl extends Object implements ServerChannel, org.eclipse.jetty.util.component.Dumpable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.cometd.bayeux.server.ConfigurableServerChannel
ConfigurableServerChannel.Initializer, ConfigurableServerChannel.ServerChannelListener
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
org.eclipse.jetty.util.component.Dumpable.DumpableContainer
-
Nested classes/interfaces inherited from interface org.cometd.bayeux.server.ServerChannel
ServerChannel.MessageListener, ServerChannel.SubscriptionListener
-
-
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 protectedServerChannelImpl(BayeuxServerImpl bayeux, 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.server.ServerChannel
publish, publish
-
-
-
-
Constructor Detail
-
ServerChannelImpl
protected ServerChannelImpl(BayeuxServerImpl bayeux, ChannelId id)
-
-
Method Detail
-
subscribe
public boolean subscribe(ServerSession session)
- Specified by:
subscribein interfaceServerChannel
-
subscribe
protected boolean subscribe(ServerSessionImpl session, ServerMessage message)
-
unsubscribe
public boolean unsubscribe(ServerSession session)
- Specified by:
unsubscribein interfaceServerChannel
-
unsubscribe
protected boolean unsubscribe(ServerSessionImpl session, ServerMessage message)
-
getSubscribers
public Set<ServerSession> getSubscribers()
- Specified by:
getSubscribersin interfaceServerChannel
-
subscribers
public Set<ServerSession> subscribers()
-
isBroadcast
public boolean isBroadcast()
- Specified by:
isBroadcastin interfaceChannel
-
isDeepWild
public boolean isDeepWild()
- Specified by:
isDeepWildin interfaceChannel
-
isLazy
public boolean isLazy()
- Specified by:
isLazyin interfaceConfigurableServerChannel
-
isPersistent
public boolean isPersistent()
- Specified by:
isPersistentin interfaceConfigurableServerChannel
-
setLazy
public void setLazy(boolean lazy)
- Specified by:
setLazyin interfaceConfigurableServerChannel
-
getLazyTimeout
public long getLazyTimeout()
- Specified by:
getLazyTimeoutin interfaceConfigurableServerChannel
-
setLazyTimeout
public void setLazyTimeout(long lazyTimeout)
- Specified by:
setLazyTimeoutin interfaceConfigurableServerChannel
-
setPersistent
public void setPersistent(boolean persistent)
- Specified by:
setPersistentin interfaceConfigurableServerChannel
-
addListener
public void addListener(ConfigurableServerChannel.ServerChannelListener listener)
- Specified by:
addListenerin interfaceConfigurableServerChannel
-
isBroadcastToPublisher
public boolean isBroadcastToPublisher()
-
setBroadcastToPublisher
public void setBroadcastToPublisher(boolean broadcastToPublisher)
-
removeListener
public void removeListener(ConfigurableServerChannel.ServerChannelListener listener)
- Specified by:
removeListenerin interfaceConfigurableServerChannel
-
getListeners
public List<ConfigurableServerChannel.ServerChannelListener> getListeners()
- Specified by:
getListenersin interfaceConfigurableServerChannel
-
listeners
protected List<ConfigurableServerChannel.ServerChannelListener> listeners()
-
getChannelId
public ChannelId getChannelId()
- Specified by:
getChannelIdin interfaceChannel
-
publish
public void publish(Session from, ServerMessage.Mutable mutable, Promise<Boolean> promise)
- Specified by:
publishin interfaceServerChannel
-
publish
public void publish(Session from, Object data, Promise<Boolean> promise)
- Specified by:
publishin interfaceServerChannel
-
sweep
protected void sweep()
-
remove
public void remove()
- Specified by:
removein interfaceServerChannel
-
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
-
addAuthorizer
public void addAuthorizer(Authorizer authorizer)
- Specified by:
addAuthorizerin interfaceConfigurableServerChannel
-
removeAuthorizer
public void removeAuthorizer(Authorizer authorizer)
- Specified by:
removeAuthorizerin interfaceConfigurableServerChannel
-
getAuthorizers
public List<Authorizer> getAuthorizers()
- Specified by:
getAuthorizersin interfaceConfigurableServerChannel
-
authorizers
protected List<Authorizer> authorizers()
-
dump
public void dump(Appendable out, String indent) throws IOException
- Specified by:
dumpin interfaceorg.eclipse.jetty.util.component.Dumpable- Throws:
IOException
-
-