Class ClientUpgradeResponse

    • Constructor Detail

      • ClientUpgradeResponse

        public ClientUpgradeResponse()
      • ClientUpgradeResponse

        public ClientUpgradeResponse​(HttpResponse response)
    • Method Detail

      • isSuccess

        public boolean isSuccess()
        Description copied from interface: UpgradeResponse
        Test if upgrade response is successful.

        Merely notes if the response was sent as a WebSocket Upgrade, or was failed (resulting in no upgrade handshake)

        Specified by:
        isSuccess in interface UpgradeResponse
        isSuccess in class UpgradeResponseAdapter
        true if upgrade response was generated, false if no upgrade response was generated
      • sendForbidden

        public void sendForbidden​(java.lang.String message)
        Description copied from class: UpgradeResponseAdapter
        Issue a forbidden upgrade response.

        This means that the websocket endpoint was valid, but the conditions to use a WebSocket resulted in a forbidden access.

        Use this when the origin or authentication is invalid.

        Specified by:
        sendForbidden in interface UpgradeResponse
        sendForbidden in class UpgradeResponseAdapter
        message - the short 1 line detail message about the forbidden response
        Throws: - if unable to send the forbidden