Class JavaxWebSocketContainer

All Implemented Interfaces:
javax.websocket.WebSocketContainer, Container, Destroyable, Dumpable, Dumpable.DumpableContainer, LifeCycle
Direct Known Subclasses:
JavaxWebSocketClientContainer

public abstract class JavaxWebSocketContainer extends ContainerLifeCycle implements javax.websocket.WebSocketContainer, Dumpable
  • Field Details

  • Constructor Details

  • Method Details

    • getExecutor

      public abstract Executor getExecutor()
    • getFrameHandlerFactory

      protected abstract JavaxWebSocketFrameHandlerFactory getFrameHandlerFactory()
    • getBufferPool

      public ByteBufferPool getBufferPool()
    • getExtensionRegistry

      public WebSocketExtensionRegistry getExtensionRegistry()
    • getObjectFactory

      public DecoratedObjectFactory getObjectFactory()
    • getWebSocketComponents

      public WebSocketComponents getWebSocketComponents()
    • getDefaultAsyncSendTimeout

      public long getDefaultAsyncSendTimeout()
      Specified by:
      getDefaultAsyncSendTimeout in interface javax.websocket.WebSocketContainer
    • getDefaultMaxBinaryMessageBufferSize

      public int getDefaultMaxBinaryMessageBufferSize()
      Specified by:
      getDefaultMaxBinaryMessageBufferSize in interface javax.websocket.WebSocketContainer
    • getDefaultMaxSessionIdleTimeout

      public long getDefaultMaxSessionIdleTimeout()
      Specified by:
      getDefaultMaxSessionIdleTimeout in interface javax.websocket.WebSocketContainer
    • getDefaultMaxTextMessageBufferSize

      public int getDefaultMaxTextMessageBufferSize()
      Specified by:
      getDefaultMaxTextMessageBufferSize in interface javax.websocket.WebSocketContainer
    • setAsyncSendTimeout

      public void setAsyncSendTimeout(long ms)
      Specified by:
      setAsyncSendTimeout in interface javax.websocket.WebSocketContainer
    • setDefaultMaxBinaryMessageBufferSize

      public void setDefaultMaxBinaryMessageBufferSize(int max)
      Specified by:
      setDefaultMaxBinaryMessageBufferSize in interface javax.websocket.WebSocketContainer
    • setDefaultMaxSessionIdleTimeout

      public void setDefaultMaxSessionIdleTimeout(long ms)
      Specified by:
      setDefaultMaxSessionIdleTimeout in interface javax.websocket.WebSocketContainer
    • setDefaultMaxTextMessageBufferSize

      public void setDefaultMaxTextMessageBufferSize(int max)
      Specified by:
      setDefaultMaxTextMessageBufferSize in interface javax.websocket.WebSocketContainer
    • getInstalledExtensions

      public Set<javax.websocket.Extension> getInstalledExtensions()
      Specified by:
      getInstalledExtensions in interface javax.websocket.WebSocketContainer
      Since:
      JSR356 v1.0
      See Also:
      • WebSocketContainer.getInstalledExtensions()
    • getOpenSessions

      public Set<javax.websocket.Session> getOpenSessions()
      Used in Session.getOpenSessions()
      Returns:
      the set of open sessions
    • newFrameHandler

      public JavaxWebSocketFrameHandler newFrameHandler(Object websocketPojo, UpgradeRequest upgradeRequest)
    • addSessionListener

      public void addSessionListener(JavaxWebSocketSessionListener listener)
      Register a WebSocketSessionListener with the container
      Parameters:
      listener - the listener
    • removeSessionListener

      public boolean removeSessionListener(JavaxWebSocketSessionListener listener)
      Remove a WebSocketSessionListener from the container
      Parameters:
      listener - the listener
      Returns:
      true if listener was present and removed
    • notifySessionListeners

      public void notifySessionListeners(Consumer<JavaxWebSocketSessionListener> consumer)
      Notify Session Listeners of events
      Parameters:
      consumer - the consumer to pass to each listener
    • dump

      public void dump(Appendable out, String indent) throws IOException
      Description copied from interface: Dumpable
      Dump this object (and children) into an Appendable using the provided indent after any new lines. The indent should not be applied to the first object dumped.
      Specified by:
      dump in interface Dumpable
      Overrides:
      dump in class ContainerLifeCycle
      Parameters:
      out - The appendable to dump to
      indent - The indent to apply after any new lines.
      Throws:
      IOException - if unable to write to Appendable