public interface UpgradeToWebSocket extends WebSocketUpgrade
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://pekko.apache.org/docs/pekko-http/current/server-side/websocket-support.html#routing-support
Modifier and Type | Method and Description |
---|---|
java.lang.Iterable<java.lang.String> |
getRequestedProtocols()
Deprecated.
Returns the sequence of protocols the client accepts.
|
HttpResponse |
handleMessagesWith(org.apache.pekko.stream.Graph<org.apache.pekko.stream.FlowShape<Message,Message>,?> handlerFlow)
Deprecated.
Returns a response that can be used to answer a WebSocket handshake request.
|
HttpResponse |
handleMessagesWith(org.apache.pekko.stream.Graph<org.apache.pekko.stream.FlowShape<Message,Message>,?> handlerFlow,
java.lang.String subprotocol)
Deprecated.
Returns a response that can be used to answer a WebSocket handshake request.
|
HttpResponse |
handleMessagesWith(org.apache.pekko.stream.Graph<org.apache.pekko.stream.SinkShape<Message>,?> inSink,
org.apache.pekko.stream.Graph<org.apache.pekko.stream.SourceShape<Message>,?> outSource)
Deprecated.
Returns a response that can be used to answer a WebSocket handshake request.
|
HttpResponse |
handleMessagesWith(org.apache.pekko.stream.Graph<org.apache.pekko.stream.SinkShape<Message>,?> inSink,
org.apache.pekko.stream.Graph<org.apache.pekko.stream.SourceShape<Message>,?> outSource,
java.lang.String subprotocol)
Deprecated.
Returns a response that can be used to answer a WebSocket handshake request.
|
java.lang.Iterable<java.lang.String> getRequestedProtocols()
See http://tools.ietf.org/html/rfc6455#section-1.9
getRequestedProtocols
in interface WebSocketUpgrade
HttpResponse handleMessagesWith(org.apache.pekko.stream.Graph<org.apache.pekko.stream.FlowShape<Message,Message>,?> handlerFlow)
handleMessagesWith
in interface WebSocketUpgrade
handlerFlow
- (undocumented)HttpResponse handleMessagesWith(org.apache.pekko.stream.Graph<org.apache.pekko.stream.FlowShape<Message,Message>,?> handlerFlow, java.lang.String subprotocol)
handleMessagesWith
in interface WebSocketUpgrade
handlerFlow
- (undocumented)subprotocol
- (undocumented)HttpResponse handleMessagesWith(org.apache.pekko.stream.Graph<org.apache.pekko.stream.SinkShape<Message>,?> inSink, org.apache.pekko.stream.Graph<org.apache.pekko.stream.SourceShape<Message>,?> outSource)
handleMessagesWith
in interface WebSocketUpgrade
inSink
- (undocumented)outSource
- (undocumented)HttpResponse handleMessagesWith(org.apache.pekko.stream.Graph<org.apache.pekko.stream.SinkShape<Message>,?> inSink, org.apache.pekko.stream.Graph<org.apache.pekko.stream.SourceShape<Message>,?> outSource, java.lang.String subprotocol)
The given subprotocol must be one of the ones offered by the client.
handleMessagesWith
in interface WebSocketUpgrade
inSink
- (undocumented)outSource
- (undocumented)subprotocol
- (undocumented)