Package org.cometd.server
Class ServerChannelImpl
java.lang.Object
org.cometd.server.ServerChannelImpl
- All Implemented Interfaces:
org.cometd.bayeux.Channel
,ConfigurableServerChannel
,ServerChannel
,org.eclipse.jetty.util.component.Dumpable
public class ServerChannelImpl extends java.lang.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
Fields inherited from interface org.eclipse.jetty.util.component.Dumpable
KEY
-
Constructor Summary
Constructors Modifier Constructor Description protected
ServerChannelImpl(BayeuxServerImpl bayeux, org.cometd.bayeux.ChannelId id)
-
Method Summary
Modifier and Type Method Description void
addAuthorizer(Authorizer authorizer)
void
addListener(ConfigurableServerChannel.ServerChannelListener listener)
protected java.util.List<Authorizer>
authorizers()
void
dump(java.lang.Appendable out, java.lang.String indent)
java.lang.Object
getAttribute(java.lang.String name)
java.util.Set<java.lang.String>
getAttributeNames()
java.util.List<Authorizer>
getAuthorizers()
org.cometd.bayeux.ChannelId
getChannelId()
java.lang.String
getId()
long
getLazyTimeout()
java.util.List<ConfigurableServerChannel.ServerChannelListener>
getListeners()
java.util.Set<ServerSession>
getSubscribers()
boolean
isBroadcast()
boolean
isBroadcastToPublisher()
boolean
isDeepWild()
boolean
isLazy()
boolean
isMeta()
boolean
isPersistent()
boolean
isService()
boolean
isWild()
protected java.util.List<ConfigurableServerChannel.ServerChannelListener>
listeners()
void
publish(org.cometd.bayeux.Session from, java.lang.Object data, org.cometd.bayeux.Promise<java.lang.Boolean> promise)
void
publish(org.cometd.bayeux.Session from, ServerMessage.Mutable mutable, org.cometd.bayeux.Promise<java.lang.Boolean> promise)
void
remove()
java.lang.Object
removeAttribute(java.lang.String name)
void
removeAuthorizer(Authorizer authorizer)
void
removeListener(ConfigurableServerChannel.ServerChannelListener listener)
void
setAttribute(java.lang.String name, java.lang.Object value)
void
setBroadcastToPublisher(boolean broadcastToPublisher)
void
setLazy(boolean lazy)
void
setLazyTimeout(long lazyTimeout)
void
setPersistent(boolean persistent)
boolean
subscribe(ServerSession session)
protected boolean
subscribe(ServerSessionImpl session, ServerMessage message)
java.util.Set<ServerSession>
subscribers()
protected void
sweep()
java.lang.String
toString()
boolean
unsubscribe(ServerSession session)
protected boolean
unsubscribe(ServerSessionImpl session, ServerMessage message)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.util.component.Dumpable
dump, dumpSelf
-
Constructor Details
-
ServerChannelImpl
-
-
Method Details
-
subscribe
- Specified by:
subscribe
in interfaceServerChannel
-
subscribe
-
unsubscribe
- Specified by:
unsubscribe
in interfaceServerChannel
-
unsubscribe
-
getSubscribers
- Specified by:
getSubscribers
in interfaceServerChannel
-
subscribers
-
isBroadcast
public boolean isBroadcast()- Specified by:
isBroadcast
in interfaceorg.cometd.bayeux.Channel
-
isDeepWild
public boolean isDeepWild()- Specified by:
isDeepWild
in interfaceorg.cometd.bayeux.Channel
-
isLazy
public boolean isLazy()- Specified by:
isLazy
in interfaceConfigurableServerChannel
-
isPersistent
public boolean isPersistent()- Specified by:
isPersistent
in interfaceConfigurableServerChannel
-
isWild
public boolean isWild()- Specified by:
isWild
in interfaceorg.cometd.bayeux.Channel
-
setLazy
public void setLazy(boolean lazy)- Specified by:
setLazy
in interfaceConfigurableServerChannel
-
getLazyTimeout
public long getLazyTimeout()- Specified by:
getLazyTimeout
in interfaceConfigurableServerChannel
-
setLazyTimeout
public void setLazyTimeout(long lazyTimeout)- Specified by:
setLazyTimeout
in interfaceConfigurableServerChannel
-
setPersistent
public void setPersistent(boolean persistent)- Specified by:
setPersistent
in interfaceConfigurableServerChannel
-
addListener
- Specified by:
addListener
in interfaceConfigurableServerChannel
-
isBroadcastToPublisher
public boolean isBroadcastToPublisher()- Specified by:
isBroadcastToPublisher
in interfaceConfigurableServerChannel
-
setBroadcastToPublisher
public void setBroadcastToPublisher(boolean broadcastToPublisher)- Specified by:
setBroadcastToPublisher
in interfaceConfigurableServerChannel
-
removeListener
- Specified by:
removeListener
in interfaceConfigurableServerChannel
-
getListeners
- Specified by:
getListeners
in interfaceConfigurableServerChannel
-
listeners
-
getChannelId
public org.cometd.bayeux.ChannelId getChannelId()- Specified by:
getChannelId
in interfaceorg.cometd.bayeux.Channel
-
getId
public java.lang.String getId()- Specified by:
getId
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
-
publish
public void publish(org.cometd.bayeux.Session from, ServerMessage.Mutable mutable, org.cometd.bayeux.Promise<java.lang.Boolean> promise)- Specified by:
publish
in interfaceServerChannel
-
publish
public void publish(org.cometd.bayeux.Session from, java.lang.Object data, org.cometd.bayeux.Promise<java.lang.Boolean> promise)- Specified by:
publish
in interfaceServerChannel
-
sweep
protected void sweep() -
remove
public void remove()- Specified by:
remove
in interfaceServerChannel
-
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
-
addAuthorizer
- Specified by:
addAuthorizer
in interfaceConfigurableServerChannel
-
removeAuthorizer
- Specified by:
removeAuthorizer
in interfaceConfigurableServerChannel
-
getAuthorizers
- Specified by:
getAuthorizers
in interfaceConfigurableServerChannel
-
authorizers
-
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
-