Class JakartaWebSocketContainer

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

public abstract class JakartaWebSocketContainer extends ContainerLifeCycle implements jakarta.websocket.WebSocketContainer, Dumpable
  • Field Details

  • Constructor Details

  • Method Details

    • getExecutor

      public abstract Executor getExecutor()
    • getFrameHandlerFactory

      protected abstract JakartaWebSocketFrameHandlerFactory getFrameHandlerFactory()
    • getByteBufferPool

      public ByteBufferPool getByteBufferPool()
    • getExtensionRegistry

      public WebSocketExtensionRegistry getExtensionRegistry()
    • getObjectFactory

      public DecoratedObjectFactory getObjectFactory()
    • getWebSocketComponents

      public WebSocketComponents getWebSocketComponents()
    • getDefaultAsyncSendTimeout

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

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

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

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

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

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

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

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

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

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

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

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

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

      public void notifySessionListeners(Consumer<JakartaWebSocketSessionListener> 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