Interface ServerUpgradeResponse

All Superinterfaces:
Content.Sink, Response
All Known Implementing Classes:
ServerUpgradeResponseDelegate

public interface ServerUpgradeResponse extends Response

The HTTP response to upgrade to WebSocket.

An instance of this class is given as a parameter to a WebSocketCreator, so that applications can interact with the response.

  • Method Details

    • getAcceptedSubProtocol

      String getAcceptedSubProtocol()
      Returns:
      the negotiated sub-protocol
    • setAcceptedSubProtocol

      void setAcceptedSubProtocol(String protocol)
      Set the negotiated sub-protocol.
      Parameters:
      protocol - the negotiated sub-protocol
    • getExtensions

      List<ExtensionConfig> getExtensions()
      Returns:
      the list of negotiated extensions
    • setExtensions

      void setExtensions(List<ExtensionConfig> configs)
      Set the list of negotiated extensions.
      Parameters:
      configs - the list of negotiated extensions