Interface WebSocketEngine

  • All Known Implementing Classes:
    TyrusWebSocketEngine

    public interface WebSocketEngine
    WebSocket engine is used for upgrading HTTP requests into websocket connections. A transport gets hold of the engine from the ServerContainer and upgrades HTTP handshake requests.
    Author:
    Pavel Bucek
    • Method Detail

      • upgrade

        WebSocketEngine.UpgradeInfo upgrade​(UpgradeRequest request,
                                            UpgradeResponse response)
        A transport calls this method to upgrade a HTTP request.
        Parameters:
        request - request to be upgraded.
        response - response to the upgrade request.
        Returns:
        info about upgrade status and connection details.
      • register

        void register​(java.lang.Class<?> endpointClass,
                      java.lang.String contextPath)
               throws DeploymentException
        Register endpoint class.
        Parameters:
        endpointClass - endpoint class to be registered.
        contextPath - context path of the registered endpoint.
        Throws:
        DeploymentException - when the endpoint is invalid.