Class WebSocketRequest


  • public abstract class WebSocketRequest
    extends java.lang.Object
    Represents a WebSocket request. Use WebSocketRequest.create to create a request for a target URI and then use addHeader or requestSubprotocol to set optional details.
    • Constructor Detail

      • WebSocketRequest

        public WebSocketRequest()
    • Method Detail

      • create

        public static WebSocketRequest create​(Uri uri)
        Creates a WebSocketRequest to a target URI. Use the methods on WebSocketRequest to specify further details.
        Parameters:
        uri - (undocumented)
        Returns:
        (undocumented)
      • create

        public static WebSocketRequest create​(java.lang.String uriString)
        Creates a WebSocketRequest to a target URI. Use the methods on WebSocketRequest to specify further details.
        Parameters:
        uriString - (undocumented)
        Returns:
        (undocumented)
      • wrap

        public static WebSocketRequest wrap​(WebSocketRequest scalaRequest)
        Wraps a Scala version of WebSocketRequest.
        Parameters:
        scalaRequest - (undocumented)
        Returns:
        (undocumented)
      • addHeader

        public abstract WebSocketRequest addHeader​(HttpHeader header)
        Return a copy of this request that contains the given additional header.
        Parameters:
        header - (undocumented)
        Returns:
        (undocumented)
      • requestSubprotocol

        public abstract WebSocketRequest requestSubprotocol​(java.lang.String subprotocol)
        Return a copy of this request that will require that the server uses the given WebSocket subprotocol.
        Parameters:
        subprotocol - (undocumented)
        Returns:
        (undocumented)