Interface WebSocketUpgrade
- All Superinterfaces:
- WebSocketUpgrade
- All Known Implementing Classes:
- UpgradeToWebSocketLowLevel
 This is a low-level API. 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
- 
Method SummaryModifier and TypeMethodDescriptionorg.apache.pekko.stream.Graph<org.apache.pekko.stream.FlowShape<Message,Message>, org.apache.pekko.NotUsed> createScalaFlow(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 APIJava APIhandleMessages(org.apache.pekko.stream.Graph<org.apache.pekko.stream.FlowShape<Message, Message>, Object> handlerFlow, scala.Option<String> subprotocol) The high-level interface to create a WebSocket server based on "messages".handleMessagesWith(org.apache.pekko.stream.Graph<org.apache.pekko.stream.FlowShape<Message, Message>, ?> handlerFlow) Java APIhandleMessagesWith(org.apache.pekko.stream.Graph<org.apache.pekko.stream.FlowShape<Message, Message>, ?> handlerFlow, String subprotocol) Java APIhandleMessagesWith(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 APIhandleMessagesWith(org.apache.pekko.stream.Graph<org.apache.pekko.stream.SinkShape<Message>, ?> inSink, org.apache.pekko.stream.Graph<org.apache.pekko.stream.SourceShape<Message>, ?> outSource, String subprotocol) Java APIhandleMessagesWithSinkSource(org.apache.pekko.stream.Graph<org.apache.pekko.stream.SinkShape<Message>, Object> inSink, org.apache.pekko.stream.Graph<org.apache.pekko.stream.SourceShape<Message>, Object> outSource, scala.Option<String> subprotocol) The high-level interface to create a WebSocket server based on "messages".scala.collection.immutable.Seq<String>A sequence of protocols the client accepts.
- 
Method Details- 
createScalaFloworg.apache.pekko.stream.Graph<org.apache.pekko.stream.FlowShape<Message,Message>, createScalaFloworg.apache.pekko.NotUsed> (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 API- Parameters:
- inSink- (undocumented)
- outSource- (undocumented)
- Returns:
- (undocumented)
 
- 
getRequestedProtocolsJava API- Specified by:
- getRequestedProtocolsin interface- WebSocketUpgrade
- Returns:
- (undocumented)
 
- 
handleMessagesHttpResponse handleMessages(org.apache.pekko.stream.Graph<org.apache.pekko.stream.FlowShape<Message, Message>, Object> handlerFlow, scala.Option<String> subprotocol) The high-level interface to create a WebSocket server based on "messages".Returns a response to return in a request handler that will signal the low-level HTTP implementation to upgrade the connection to WebSocket and use the supplied handler to handle incoming WebSocket messages. Optionally, a subprotocol out of the ones requested by the client can be chosen. - Parameters:
- handlerFlow- (undocumented)
- subprotocol- (undocumented)
- Returns:
- (undocumented)
 
- 
handleMessagesWithHttpResponse handleMessagesWith(org.apache.pekko.stream.Graph<org.apache.pekko.stream.FlowShape<Message, Message>, ?> handlerFlow) Java API- Specified by:
- handleMessagesWithin interface- WebSocketUpgrade
- Parameters:
- handlerFlow- (undocumented)
- Returns:
- (undocumented)
 
- 
handleMessagesWithHttpResponse handleMessagesWith(org.apache.pekko.stream.Graph<org.apache.pekko.stream.FlowShape<Message, Message>, ?> handlerFlow, String subprotocol) Java API- Specified by:
- handleMessagesWithin interface- WebSocketUpgrade
- Parameters:
- handlerFlow- (undocumented)
- subprotocol- (undocumented)
- Returns:
- (undocumented)
 
- 
handleMessagesWithHttpResponse 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 API- Specified by:
- handleMessagesWithin interface- WebSocketUpgrade
- Parameters:
- inSink- (undocumented)
- outSource- (undocumented)
- Returns:
- (undocumented)
 
- 
handleMessagesWithHttpResponse 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, String subprotocol) Java API- Specified by:
- handleMessagesWithin interface- WebSocketUpgrade
- Parameters:
- inSink- (undocumented)
- outSource- (undocumented)
- subprotocol- (undocumented)
- Returns:
- (undocumented)
 
- 
handleMessagesWithSinkSourceHttpResponse handleMessagesWithSinkSource(org.apache.pekko.stream.Graph<org.apache.pekko.stream.SinkShape<Message>, Object> inSink, org.apache.pekko.stream.Graph<org.apache.pekko.stream.SourceShape<Message>, Object> outSource, scala.Option<String> subprotocol) The high-level interface to create a WebSocket server based on "messages".Returns a response to return in a request handler that will signal the low-level HTTP implementation to upgrade the connection to WebSocket and use the supplied inSink to consume messages received from the client and the supplied outSource to produce message to sent to the client. Optionally, a subprotocol out of the ones requested by the client can be chosen. - Parameters:
- inSink- (undocumented)
- outSource- (undocumented)
- subprotocol- (undocumented)
- Returns:
- (undocumented)
 
- 
requestedProtocolsscala.collection.immutable.Seq<String> requestedProtocols()A sequence of protocols the client accepts.See http://tools.ietf.org/html/rfc6455#section-1.9 - Returns:
- (undocumented)
 
 
-