Interface ServerUpgradeResponse

All Superinterfaces:
org.eclipse.jetty.io.Content.Sink, org.eclipse.jetty.server.Response

public interface ServerUpgradeResponse extends org.eclipse.jetty.server.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.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.eclipse.jetty.server.Response

    org.eclipse.jetty.server.Response.Wrapper
  • Method Summary

    Modifier and Type
    Method
    Description
     
    List<org.eclipse.jetty.websocket.api.ExtensionConfig>
     
    void
    Set the negotiated sub-protocol.
    void
    setExtensions(List<org.eclipse.jetty.websocket.api.ExtensionConfig> configs)
    Set the list of negotiated extensions.

    Methods inherited from interface org.eclipse.jetty.server.Response

    getHeaders, getRequest, getStatus, getTrailersSupplier, hasLastWrite, isCommitted, isCompletedSuccessfully, reset, setStatus, setTrailersSupplier, write, writeInterim
  • 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<org.eclipse.jetty.websocket.api.ExtensionConfig> getExtensions()
      Returns:
      the list of negotiated extensions
    • setExtensions

      void setExtensions(List<org.eclipse.jetty.websocket.api.ExtensionConfig> configs)
      Set the list of negotiated extensions.
      Parameters:
      configs - the list of negotiated extensions