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 Object implements org.cometd.bayeux.server.ServerChannel, org.eclipse.jetty.util.component.Dumpable
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.cometd.bayeux.server.ConfigurableServerChannel

    org.cometd.bayeux.server.ConfigurableServerChannel.Initializer, org.cometd.bayeux.server.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

    org.cometd.bayeux.server.ServerChannel.MessageListener, org.cometd.bayeux.server.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(org.cometd.bayeux.server.Authorizer authorizer)
     
    void
    addListener(org.cometd.bayeux.server.ConfigurableServerChannel.ServerChannelListener listener)
     
    protected List<org.cometd.bayeux.server.Authorizer>
     
    void
    dump(Appendable out, String indent)
     
     
     
    List<org.cometd.bayeux.server.Authorizer>
     
    org.cometd.bayeux.ChannelId
     
     
    long
     
    List<org.cometd.bayeux.server.ConfigurableServerChannel.ServerChannelListener>
     
    Set<org.cometd.bayeux.server.ServerSession>
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    protected List<org.cometd.bayeux.server.ConfigurableServerChannel.ServerChannelListener>
     
    void
    publish(org.cometd.bayeux.Session from, Object data, org.cometd.bayeux.Promise<Boolean> promise)
     
    void
    publish(org.cometd.bayeux.Session from, org.cometd.bayeux.server.ServerMessage.Mutable mutable, org.cometd.bayeux.Promise<Boolean> promise)
     
    void
     
     
    void
    removeAuthorizer(org.cometd.bayeux.server.Authorizer authorizer)
     
    void
    removeListener(org.cometd.bayeux.server.ConfigurableServerChannel.ServerChannelListener listener)
     
    void
    setAttribute(String name, Object value)
     
    void
    setBroadcastToPublisher(boolean broadcastToPublisher)
     
    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)
     
    Set<org.cometd.bayeux.server.ServerSession>
     
    protected boolean
     
     
    boolean
    unsubscribe(org.cometd.bayeux.server.ServerSession session)
     
    protected boolean
    unsubscribe(ServerSessionImpl session, org.cometd.bayeux.server.ServerMessage message)
     

    Methods inherited from class 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

      protected ServerChannelImpl(BayeuxServerImpl bayeux, org.cometd.bayeux.ChannelId id)
  • Method Details

    • subscribe

      public boolean subscribe(org.cometd.bayeux.server.ServerSession session)
      Specified by:
      subscribe in interface org.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 interface org.cometd.bayeux.server.ServerChannel
    • unsubscribe

      protected boolean unsubscribe(ServerSessionImpl session, org.cometd.bayeux.server.ServerMessage message)
    • getSubscribers

      public Set<org.cometd.bayeux.server.ServerSession> getSubscribers()
      Specified by:
      getSubscribers in interface org.cometd.bayeux.server.ServerChannel
    • subscribers

      public Set<org.cometd.bayeux.server.ServerSession> subscribers()
    • isBroadcast

      public boolean isBroadcast()
      Specified by:
      isBroadcast in interface org.cometd.bayeux.Channel
    • isDeepWild

      public boolean isDeepWild()
      Specified by:
      isDeepWild in interface org.cometd.bayeux.Channel
    • isLazy

      public boolean isLazy()
      Specified by:
      isLazy in interface org.cometd.bayeux.server.ConfigurableServerChannel
    • isPersistent

      public boolean isPersistent()
      Specified by:
      isPersistent in interface org.cometd.bayeux.server.ConfigurableServerChannel
    • isWild

      public boolean isWild()
      Specified by:
      isWild in interface org.cometd.bayeux.Channel
    • setLazy

      public void setLazy(boolean lazy)
      Specified by:
      setLazy in interface org.cometd.bayeux.server.ConfigurableServerChannel
    • getLazyTimeout

      public long getLazyTimeout()
      Specified by:
      getLazyTimeout in interface org.cometd.bayeux.server.ConfigurableServerChannel
    • setLazyTimeout

      public void setLazyTimeout(long lazyTimeout)
      Specified by:
      setLazyTimeout in interface org.cometd.bayeux.server.ConfigurableServerChannel
    • setPersistent

      public void setPersistent(boolean persistent)
      Specified by:
      setPersistent in interface org.cometd.bayeux.server.ConfigurableServerChannel
    • addListener

      public void addListener(org.cometd.bayeux.server.ConfigurableServerChannel.ServerChannelListener listener)
      Specified by:
      addListener in interface org.cometd.bayeux.server.ConfigurableServerChannel
    • isBroadcastToPublisher

      public boolean isBroadcastToPublisher()
      Specified by:
      isBroadcastToPublisher in interface org.cometd.bayeux.server.ConfigurableServerChannel
    • setBroadcastToPublisher

      public void setBroadcastToPublisher(boolean broadcastToPublisher)
      Specified by:
      setBroadcastToPublisher in interface org.cometd.bayeux.server.ConfigurableServerChannel
    • removeListener

      public void removeListener(org.cometd.bayeux.server.ConfigurableServerChannel.ServerChannelListener listener)
      Specified by:
      removeListener in interface org.cometd.bayeux.server.ConfigurableServerChannel
    • getListeners

      public List<org.cometd.bayeux.server.ConfigurableServerChannel.ServerChannelListener> getListeners()
      Specified by:
      getListeners in interface org.cometd.bayeux.server.ConfigurableServerChannel
    • listeners

      protected List<org.cometd.bayeux.server.ConfigurableServerChannel.ServerChannelListener> listeners()
    • getChannelId

      public org.cometd.bayeux.ChannelId getChannelId()
      Specified by:
      getChannelId in interface org.cometd.bayeux.Channel
    • getId

      public String getId()
      Specified by:
      getId in interface org.cometd.bayeux.Channel
    • isMeta

      public boolean isMeta()
      Specified by:
      isMeta in interface org.cometd.bayeux.Channel
    • isService

      public boolean isService()
      Specified by:
      isService in interface org.cometd.bayeux.Channel
    • publish

      public void publish(org.cometd.bayeux.Session from, org.cometd.bayeux.server.ServerMessage.Mutable mutable, org.cometd.bayeux.Promise<Boolean> promise)
      Specified by:
      publish in interface org.cometd.bayeux.server.ServerChannel
    • publish

      public void publish(org.cometd.bayeux.Session from, Object data, org.cometd.bayeux.Promise<Boolean> promise)
      Specified by:
      publish in interface org.cometd.bayeux.server.ServerChannel
    • sweep

      protected boolean sweep()
    • remove

      public void remove()
      Specified by:
      remove in interface org.cometd.bayeux.server.ServerChannel
    • setAttribute

      public void setAttribute(String name, Object value)
      Specified by:
      setAttribute in interface org.cometd.bayeux.Channel
    • getAttribute

      public Object getAttribute(String name)
      Specified by:
      getAttribute in interface org.cometd.bayeux.Channel
    • getAttributeNames

      public Set<String> getAttributeNames()
      Specified by:
      getAttributeNames in interface org.cometd.bayeux.Channel
    • removeAttribute

      public Object removeAttribute(String name)
      Specified by:
      removeAttribute in interface org.cometd.bayeux.Channel
    • addAuthorizer

      public void addAuthorizer(org.cometd.bayeux.server.Authorizer authorizer)
      Specified by:
      addAuthorizer in interface org.cometd.bayeux.server.ConfigurableServerChannel
    • removeAuthorizer

      public void removeAuthorizer(org.cometd.bayeux.server.Authorizer authorizer)
      Specified by:
      removeAuthorizer in interface org.cometd.bayeux.server.ConfigurableServerChannel
    • getAuthorizers

      public List<org.cometd.bayeux.server.Authorizer> getAuthorizers()
      Specified by:
      getAuthorizers in interface org.cometd.bayeux.server.ConfigurableServerChannel
    • authorizers

      protected List<org.cometd.bayeux.server.Authorizer> authorizers()
    • dump

      public void dump(Appendable out, String indent) throws IOException
      Specified by:
      dump in interface org.eclipse.jetty.util.component.Dumpable
      Throws:
      IOException
    • toString

      public String toString()
      Overrides:
      toString in class Object