use of org.springframework.web.reactive.socket.adapter.UndertowWebSocketHandlerAdapter in project spring-framework by spring-projects.
the class UndertowWebSocketClient method handleChannel.
private void handleChannel(URI url, WebSocketHandler handler, MonoProcessor<Void> completion, DefaultNegotiation negotiation, WebSocketChannel channel) {
HandshakeInfo info = afterHandshake(url, negotiation.getResponseHeaders());
UndertowWebSocketSession session = new UndertowWebSocketSession(channel, info, bufferFactory, completion);
UndertowWebSocketHandlerAdapter adapter = new UndertowWebSocketHandlerAdapter(session);
channel.getReceiveSetter().set(adapter);
channel.resumeReceives();
handler.handle(session).subscribe(session);
}
use of org.springframework.web.reactive.socket.adapter.UndertowWebSocketHandlerAdapter in project spring-framework by spring-projects.
the class UndertowWebSocketClient method handleChannel.
private void handleChannel(URI url, WebSocketHandler handler, Sinks.Empty<Void> completionSink, DefaultNegotiation negotiation, WebSocketChannel channel) {
HandshakeInfo info = createHandshakeInfo(url, negotiation);
DataBufferFactory bufferFactory = DefaultDataBufferFactory.sharedInstance;
UndertowWebSocketSession session = new UndertowWebSocketSession(channel, info, bufferFactory, completionSink);
UndertowWebSocketHandlerAdapter adapter = new UndertowWebSocketHandlerAdapter(session);
channel.getReceiveSetter().set(adapter);
channel.resumeReceives();
handler.handle(session).checkpoint(url + " [UndertowWebSocketClient]").subscribe(session);
}
Aggregations