Interface ServerContainer

  • All Superinterfaces:
    jakarta.websocket.server.ServerContainer, WebSocketContainer

    public interface ServerContainer
    extends jakarta.websocket.server.ServerContainer
    HTTP server abstraction.

    TODO rename the class to avoid findbugs

    Author:
    Martin Matula
    • Method Detail

      • start

        void start​(java.lang.String rootPath,
                   int port)
            throws java.io.IOException,
                   DeploymentException
        Start the server.

        Creates a new embedded HTTP server (if supported) listening to incoming connections at a given root path and port.

        Parameters:
        rootPath - context root
        port - TCP port
        Throws:
        java.io.IOException - if something goes wrong.
        DeploymentException - when there is any issue with endpoints or other, non-specific issues.
      • stop

        void stop()
        Stop the server.
      • getWebSocketEngine

        WebSocketEngine getWebSocketEngine()
        Return WebSocketEngine to upgrade requests and setting up the connection.
        Returns:
        websocket engine