Package akka.http.javadsl.model.ws
Interface UpgradeToWebSocket
- All Superinterfaces:
WebSocketUpgrade
- All Known Subinterfaces:
UpgradeToWebSocket
- All Known Implementing Classes:
UpgradeToWebSocketLowLevel
Deprecated.
use the WebSocketUpgrade attribute instead since 10.2.0
A virtual header that WebSocket requests will contain. Use
UpgradeToWebSocket.handleMessagesWith
to
create a WebSocket handshake response and handle the WebSocket message stream with the given handler.
This low-level API is expected to be replaced by an Attribute in the future.
In any case, you might want to use handleWebSocketMessages
instead as documented
at https://doc.akka.io/docs/akka-http/current/server-side/websocket-support.html#routing-support
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Returns the sequence of protocols the client accepts.handleMessagesWith
(akka.stream.Graph<akka.stream.FlowShape<Message, Message>, ?> handlerFlow) Deprecated.Returns a response that can be used to answer a WebSocket handshake request.handleMessagesWith
(akka.stream.Graph<akka.stream.FlowShape<Message, Message>, ?> handlerFlow, String subprotocol) Deprecated.Returns a response that can be used to answer a WebSocket handshake request.handleMessagesWith
(akka.stream.Graph<akka.stream.SinkShape<Message>, ?> inSink, akka.stream.Graph<akka.stream.SourceShape<Message>, ?> outSource) Deprecated.Returns a response that can be used to answer a WebSocket handshake request.handleMessagesWith
(akka.stream.Graph<akka.stream.SinkShape<Message>, ?> inSink, akka.stream.Graph<akka.stream.SourceShape<Message>, ?> outSource, String subprotocol) Deprecated.Returns a response that can be used to answer a WebSocket handshake request.
-
Method Details
-
getRequestedProtocols
Deprecated.Returns the sequence of protocols the client accepts.See http://tools.ietf.org/html/rfc6455#section-1.9
- Specified by:
getRequestedProtocols
in interfaceWebSocketUpgrade
- Returns:
- (undocumented)
-
handleMessagesWith
HttpResponse handleMessagesWith(akka.stream.Graph<akka.stream.FlowShape<Message, Message>, ?> handlerFlow) Deprecated.Returns a response that can be used to answer a WebSocket handshake request. The connection will afterwards use the given handlerFlow to handle WebSocket messages from the client.- Specified by:
handleMessagesWith
in interfaceWebSocketUpgrade
- Parameters:
handlerFlow
- (undocumented)- Returns:
- (undocumented)
-
handleMessagesWith
HttpResponse handleMessagesWith(akka.stream.Graph<akka.stream.FlowShape<Message, Message>, ?> handlerFlow, String subprotocol) Deprecated.Returns a response that can be used to answer a WebSocket handshake request. The connection will afterwards use the given handlerFlow to handle WebSocket messages from the client. The given subprotocol must be one of the ones offered by the client.- Specified by:
handleMessagesWith
in interfaceWebSocketUpgrade
- Parameters:
handlerFlow
- (undocumented)subprotocol
- (undocumented)- Returns:
- (undocumented)
-
handleMessagesWith
HttpResponse handleMessagesWith(akka.stream.Graph<akka.stream.SinkShape<Message>, ?> inSink, akka.stream.Graph<akka.stream.SourceShape<Message>, ?> outSource) Deprecated.Returns a response that can be used to answer a WebSocket handshake request. The connection will afterwards use the given inSink to handle WebSocket messages from the client and the given outSource to send messages to the client.- Specified by:
handleMessagesWith
in interfaceWebSocketUpgrade
- Parameters:
inSink
- (undocumented)outSource
- (undocumented)- Returns:
- (undocumented)
-
handleMessagesWith
HttpResponse handleMessagesWith(akka.stream.Graph<akka.stream.SinkShape<Message>, ?> inSink, akka.stream.Graph<akka.stream.SourceShape<Message>, ?> outSource, String subprotocol) Deprecated.Returns a response that can be used to answer a WebSocket handshake request. The connection will afterwards use the given inSink to handle WebSocket messages from the client and the given outSource to send messages to the client.The given subprotocol must be one of the ones offered by the client.
- Specified by:
handleMessagesWith
in interfaceWebSocketUpgrade
- Parameters:
inSink
- (undocumented)outSource
- (undocumented)subprotocol
- (undocumented)- Returns:
- (undocumented)
-