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

    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.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 java.util.List<org.cometd.bayeux.server.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<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 isBroadcastToPublisher()  
    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 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)  
    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)  

    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

    Methods inherited from interface org.cometd.bayeux.server.ServerChannel

    publish, publish
  • Constructor Details

  • 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 java.util.Set<org.cometd.bayeux.server.ServerSession> getSubscribers()
      Specified by:
      getSubscribers in interface org.cometd.bayeux.server.ServerChannel
    • subscribers

      public java.util.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()
    • setBroadcastToPublisher

      public void setBroadcastToPublisher​(boolean broadcastToPublisher)
    • removeListener

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

      public java.util.List<org.cometd.bayeux.server.ConfigurableServerChannel.ServerChannelListener> getListeners()
      Specified by:
      getListeners in interface org.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 interface org.cometd.bayeux.Channel
    • getId

      public java.lang.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<java.lang.Boolean> promise)
      Specified by:
      publish in interface org.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 interface org.cometd.bayeux.server.ServerChannel
    • sweep

      protected void sweep()
    • remove

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

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

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

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

      public java.lang.Object removeAttribute​(java.lang.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 java.util.List<org.cometd.bayeux.server.Authorizer> getAuthorizers()
      Specified by:
      getAuthorizers in interface org.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:
      dump in interface org.eclipse.jetty.util.component.Dumpable
      Throws:
      java.io.IOException
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object