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
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ServerChannelImpl(BayeuxServerImpl bayeux, org.cometd.bayeux.ChannelId id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAuthorizer(org.cometd.bayeux.server.Authorizer authorizer)
void
addListener(org.cometd.bayeux.server.ConfigurableServerChannel.ServerChannelListener listener)
protected java.util.List<org.cometd.bayeux.server.Authorizer>
authorizers()
java.lang.String
dump()
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<org.cometd.bayeux.server.Authorizer>
getAuthorizers()
org.cometd.bayeux.ChannelId
getChannelId()
java.lang.String
getId()
long
getLazyTimeout()
java.util.List<org.cometd.bayeux.server.ConfigurableServerChannel.ServerChannelListener>
getListeners()
java.util.Set<org.cometd.bayeux.server.ServerSession>
getSubscribers()
boolean
isBroadcast()
boolean
isDeepWild()
boolean
isLazy()
boolean
isMeta()
boolean
isPersistent()
boolean
isService()
boolean
isWild()
protected java.util.List<org.cometd.bayeux.server.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, org.cometd.bayeux.server.ServerMessage.Mutable mutable, org.cometd.bayeux.Promise<java.lang.Boolean> promise)
void
remove()
java.lang.Object
removeAttribute(java.lang.String name)
void
removeAuthorizer(org.cometd.bayeux.server.Authorizer authorizer)
void
removeListener(org.cometd.bayeux.server.ConfigurableServerChannel.ServerChannelListener listener)
void
setAttribute(java.lang.String name, java.lang.Object value)
void
setLazy(boolean lazy)
void
setLazyTimeout(long lazyTimeout)
void
setPersistent(boolean persistent)
boolean
subscribe(org.cometd.bayeux.server.ServerSession session)
protected boolean
subscribe(ServerSessionImpl session, org.cometd.bayeux.server.ServerMessage message)
java.util.Set<org.cometd.bayeux.server.ServerSession>
subscribers()
protected void
sweep()
java.lang.String
toString()
boolean
unsubscribe(org.cometd.bayeux.server.ServerSession session)
protected boolean
unsubscribe(ServerSessionImpl session, org.cometd.bayeux.server.ServerMessage message)
-
-
-
Constructor Detail
-
ServerChannelImpl
protected ServerChannelImpl(BayeuxServerImpl bayeux, org.cometd.bayeux.ChannelId id)
-
-
Method Detail
-
subscribe
public boolean subscribe(org.cometd.bayeux.server.ServerSession session)
- Specified by:
subscribe
in 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:
unsubscribe
in 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:
getSubscribers
in interfaceorg.cometd.bayeux.server.ServerChannel
-
subscribers
public java.util.Set<org.cometd.bayeux.server.ServerSession> 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 interfaceorg.cometd.bayeux.server.ConfigurableServerChannel
-
isPersistent
public boolean isPersistent()
- Specified by:
isPersistent
in interfaceorg.cometd.bayeux.server.ConfigurableServerChannel
-
isWild
public boolean isWild()
- Specified by:
isWild
in interfaceorg.cometd.bayeux.Channel
-
setLazy
public void setLazy(boolean lazy)
- Specified by:
setLazy
in interfaceorg.cometd.bayeux.server.ConfigurableServerChannel
-
getLazyTimeout
public long getLazyTimeout()
- Specified by:
getLazyTimeout
in interfaceorg.cometd.bayeux.server.ConfigurableServerChannel
-
setLazyTimeout
public void setLazyTimeout(long lazyTimeout)
- Specified by:
setLazyTimeout
in interfaceorg.cometd.bayeux.server.ConfigurableServerChannel
-
setPersistent
public void setPersistent(boolean persistent)
- Specified by:
setPersistent
in interfaceorg.cometd.bayeux.server.ConfigurableServerChannel
-
addListener
public void addListener(org.cometd.bayeux.server.ConfigurableServerChannel.ServerChannelListener listener)
- Specified by:
addListener
in interfaceorg.cometd.bayeux.server.ConfigurableServerChannel
-
removeListener
public void removeListener(org.cometd.bayeux.server.ConfigurableServerChannel.ServerChannelListener listener)
- Specified by:
removeListener
in interfaceorg.cometd.bayeux.server.ConfigurableServerChannel
-
getListeners
public java.util.List<org.cometd.bayeux.server.ConfigurableServerChannel.ServerChannelListener> getListeners()
- Specified by:
getListeners
in 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:
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, org.cometd.bayeux.server.ServerMessage.Mutable mutable, org.cometd.bayeux.Promise<java.lang.Boolean> promise)
- Specified by:
publish
in 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:
publish
in interfaceorg.cometd.bayeux.server.ServerChannel
-
sweep
protected void sweep()
-
remove
public void remove()
- Specified by:
remove
in interfaceorg.cometd.bayeux.server.ServerChannel
-
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
public void addAuthorizer(org.cometd.bayeux.server.Authorizer authorizer)
- Specified by:
addAuthorizer
in interfaceorg.cometd.bayeux.server.ConfigurableServerChannel
-
removeAuthorizer
public void removeAuthorizer(org.cometd.bayeux.server.Authorizer authorizer)
- Specified by:
removeAuthorizer
in interfaceorg.cometd.bayeux.server.ConfigurableServerChannel
-
getAuthorizers
public java.util.List<org.cometd.bayeux.server.Authorizer> getAuthorizers()
- Specified by:
getAuthorizers
in interfaceorg.cometd.bayeux.server.ConfigurableServerChannel
-
authorizers
protected java.util.List<org.cometd.bayeux.server.Authorizer> authorizers()
-
dump
public java.lang.String dump()
- Specified by:
dump
in interfaceorg.eclipse.jetty.util.component.Dumpable
-
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
-
-