Package org.cometd.server
Class ServerChannelImpl
java.lang.Object
org.cometd.server.ServerChannelImpl
- All Implemented Interfaces:
org.cometd.bayeux.Channel,org.cometd.bayeux.server.ConfigurableServerChannel,org.cometd.bayeux.server.ServerChannel,org.eclipse.jetty.util.component.Dumpable
public class ServerChannelImpl
extends java.lang.Object
implements org.cometd.bayeux.server.ServerChannel, org.eclipse.jetty.util.component.Dumpable
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protectedServerChannelImpl(BayeuxServerImpl bayeux, org.cometd.bayeux.ChannelId id) -
Method Summary
Modifier and Type Method Description voidaddAuthorizer(org.cometd.bayeux.server.Authorizer authorizer)voidaddListener(org.cometd.bayeux.server.ConfigurableServerChannel.ServerChannelListener listener)protected java.util.List<org.cometd.bayeux.server.Authorizer>authorizers()voiddump(java.lang.Appendable out, java.lang.String indent)java.lang.ObjectgetAttribute(java.lang.String name)java.util.Set<java.lang.String>getAttributeNames()java.util.List<org.cometd.bayeux.server.Authorizer>getAuthorizers()org.cometd.bayeux.ChannelIdgetChannelId()java.lang.StringgetId()longgetLazyTimeout()java.util.List<org.cometd.bayeux.server.ConfigurableServerChannel.ServerChannelListener>getListeners()java.util.Set<org.cometd.bayeux.server.ServerSession>getSubscribers()booleanisBroadcast()booleanisBroadcastToPublisher()booleanisDeepWild()booleanisLazy()booleanisMeta()booleanisPersistent()booleanisService()booleanisWild()protected java.util.List<org.cometd.bayeux.server.ConfigurableServerChannel.ServerChannelListener>listeners()voidpublish(org.cometd.bayeux.Session from, java.lang.Object data, org.cometd.bayeux.Promise<java.lang.Boolean> promise)voidpublish(org.cometd.bayeux.Session from, org.cometd.bayeux.server.ServerMessage.Mutable mutable, org.cometd.bayeux.Promise<java.lang.Boolean> promise)voidremove()java.lang.ObjectremoveAttribute(java.lang.String name)voidremoveAuthorizer(org.cometd.bayeux.server.Authorizer authorizer)voidremoveListener(org.cometd.bayeux.server.ConfigurableServerChannel.ServerChannelListener listener)voidsetAttribute(java.lang.String name, java.lang.Object value)voidsetBroadcastToPublisher(boolean broadcastToPublisher)voidsetLazy(boolean lazy)voidsetLazyTimeout(long lazyTimeout)voidsetPersistent(boolean persistent)booleansubscribe(org.cometd.bayeux.server.ServerSession session)protected booleansubscribe(ServerSessionImpl session, org.cometd.bayeux.server.ServerMessage message)java.util.Set<org.cometd.bayeux.server.ServerSession>subscribers()protected voidsweep()java.lang.StringtoString()booleanunsubscribe(org.cometd.bayeux.server.ServerSession session)protected booleanunsubscribe(ServerSessionImpl session, org.cometd.bayeux.server.ServerMessage message)
-
Constructor Details
-
Method Details
-
subscribe
public boolean subscribe(org.cometd.bayeux.server.ServerSession session)- Specified by:
subscribein interfaceorg.cometd.bayeux.server.ServerChannel
-
subscribe
protected boolean subscribe(ServerSessionImpl session, org.cometd.bayeux.server.ServerMessage message) -
unsubscribe
public boolean unsubscribe(org.cometd.bayeux.server.ServerSession session)- Specified by:
unsubscribein interfaceorg.cometd.bayeux.server.ServerChannel
-
unsubscribe
protected boolean unsubscribe(ServerSessionImpl session, org.cometd.bayeux.server.ServerMessage message) -
getSubscribers
public java.util.Set<org.cometd.bayeux.server.ServerSession> getSubscribers()- Specified by:
getSubscribersin interfaceorg.cometd.bayeux.server.ServerChannel
-
subscribers
public java.util.Set<org.cometd.bayeux.server.ServerSession> subscribers() -
isBroadcast
public boolean isBroadcast()- Specified by:
isBroadcastin interfaceorg.cometd.bayeux.Channel
-
isDeepWild
public boolean isDeepWild()- Specified by:
isDeepWildin interfaceorg.cometd.bayeux.Channel
-
isLazy
public boolean isLazy()- Specified by:
isLazyin interfaceorg.cometd.bayeux.server.ConfigurableServerChannel
-
isPersistent
public boolean isPersistent()- Specified by:
isPersistentin interfaceorg.cometd.bayeux.server.ConfigurableServerChannel
-
isWild
public boolean isWild()- Specified by:
isWildin interfaceorg.cometd.bayeux.Channel
-
setLazy
public void setLazy(boolean lazy)- Specified by:
setLazyin interfaceorg.cometd.bayeux.server.ConfigurableServerChannel
-
getLazyTimeout
public long getLazyTimeout()- Specified by:
getLazyTimeoutin interfaceorg.cometd.bayeux.server.ConfigurableServerChannel
-
setLazyTimeout
public void setLazyTimeout(long lazyTimeout)- Specified by:
setLazyTimeoutin interfaceorg.cometd.bayeux.server.ConfigurableServerChannel
-
setPersistent
public void setPersistent(boolean persistent)- Specified by:
setPersistentin interfaceorg.cometd.bayeux.server.ConfigurableServerChannel
-
addListener
public void addListener(org.cometd.bayeux.server.ConfigurableServerChannel.ServerChannelListener listener)- Specified by:
addListenerin interfaceorg.cometd.bayeux.server.ConfigurableServerChannel
-
isBroadcastToPublisher
public boolean isBroadcastToPublisher() -
setBroadcastToPublisher
public void setBroadcastToPublisher(boolean broadcastToPublisher) -
removeListener
public void removeListener(org.cometd.bayeux.server.ConfigurableServerChannel.ServerChannelListener listener)- Specified by:
removeListenerin interfaceorg.cometd.bayeux.server.ConfigurableServerChannel
-
getListeners
public java.util.List<org.cometd.bayeux.server.ConfigurableServerChannel.ServerChannelListener> getListeners()- Specified by:
getListenersin interfaceorg.cometd.bayeux.server.ConfigurableServerChannel
-
listeners
protected java.util.List<org.cometd.bayeux.server.ConfigurableServerChannel.ServerChannelListener> listeners() -
getChannelId
public org.cometd.bayeux.ChannelId getChannelId()- Specified by:
getChannelIdin interfaceorg.cometd.bayeux.Channel
-
getId
public java.lang.String getId()- Specified by:
getIdin 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
-
publish
public void publish(org.cometd.bayeux.Session from, org.cometd.bayeux.server.ServerMessage.Mutable mutable, org.cometd.bayeux.Promise<java.lang.Boolean> promise)- Specified by:
publishin interfaceorg.cometd.bayeux.server.ServerChannel
-
publish
public void publish(org.cometd.bayeux.Session from, java.lang.Object data, org.cometd.bayeux.Promise<java.lang.Boolean> promise)- Specified by:
publishin interfaceorg.cometd.bayeux.server.ServerChannel
-
sweep
protected void sweep() -
remove
public void remove()- Specified by:
removein interfaceorg.cometd.bayeux.server.ServerChannel
-
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
-
addAuthorizer
public void addAuthorizer(org.cometd.bayeux.server.Authorizer authorizer)- Specified by:
addAuthorizerin interfaceorg.cometd.bayeux.server.ConfigurableServerChannel
-
removeAuthorizer
public void removeAuthorizer(org.cometd.bayeux.server.Authorizer authorizer)- Specified by:
removeAuthorizerin interfaceorg.cometd.bayeux.server.ConfigurableServerChannel
-
getAuthorizers
public java.util.List<org.cometd.bayeux.server.Authorizer> getAuthorizers()- Specified by:
getAuthorizersin interfaceorg.cometd.bayeux.server.ConfigurableServerChannel
-
authorizers
protected java.util.List<org.cometd.bayeux.server.Authorizer> authorizers() -
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
-