Package akka.http.javadsl.model.ws
Class WebSocketRequest
- java.lang.Object
-
- akka.http.javadsl.model.ws.WebSocketRequest
-
public abstract class WebSocketRequest extends java.lang.Object
Represents a WebSocket request. UseWebSocketRequest.create
to create a request for a target URI and then useaddHeader
orrequestSubprotocol
to set optional details.
-
-
Constructor Summary
Constructors Constructor Description WebSocketRequest()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract WebSocketRequest
addHeader(HttpHeader header)
Return a copy of this request that contains the given additional header.abstract WebSocketRequest
asScala()
static WebSocketRequest
create(Uri uri)
Creates a WebSocketRequest to a target URI.static WebSocketRequest
create(java.lang.String uriString)
Creates a WebSocketRequest to a target URI.abstract WebSocketRequest
requestSubprotocol(java.lang.String subprotocol)
Return a copy of this request that will require that the server uses the given WebSocket subprotocol.static WebSocketRequest
wrap(WebSocketRequest scalaRequest)
Wraps a Scala version of WebSocketRequest.
-
-
-
Method Detail
-
create
public static WebSocketRequest create(Uri uri)
Creates a WebSocketRequest to a target URI. Use the methods onWebSocketRequest
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 onWebSocketRequest
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)
-
asScala
public abstract WebSocketRequest asScala()
-
-