Search in sources :

Example 1 with UndertowWebSocketSession

use of org.springframework.web.reactive.socket.adapter.UndertowWebSocketSession 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);
}
Also used : UndertowWebSocketSession(org.springframework.web.reactive.socket.adapter.UndertowWebSocketSession) HandshakeInfo(org.springframework.web.reactive.socket.HandshakeInfo) UndertowWebSocketHandlerAdapter(org.springframework.web.reactive.socket.adapter.UndertowWebSocketHandlerAdapter)

Aggregations

HandshakeInfo (org.springframework.web.reactive.socket.HandshakeInfo)1 UndertowWebSocketHandlerAdapter (org.springframework.web.reactive.socket.adapter.UndertowWebSocketHandlerAdapter)1 UndertowWebSocketSession (org.springframework.web.reactive.socket.adapter.UndertowWebSocketSession)1