Example usage for org.springframework.web.reactive.socket.adapter UndertowWebSocketSession UndertowWebSocketSession

List of usage examples for org.springframework.web.reactive.socket.adapter UndertowWebSocketSession UndertowWebSocketSession

Introduction

In this page you can find the example usage for org.springframework.web.reactive.socket.adapter UndertowWebSocketSession UndertowWebSocketSession.

Prototype

public UndertowWebSocketSession(WebSocketChannel channel, HandshakeInfo info, DataBufferFactory factory,
            @Nullable MonoProcessor<Void> completionMono) 

Source Link

Usage

From source file:org.springframework.web.reactive.socket.client.UndertowWebSocketClient.java

private void handleChannel(URI url, WebSocketHandler handler, MonoProcessor<Void> completion,
        DefaultNegotiation negotiation, WebSocketChannel channel) {

    HandshakeInfo info = createHandshakeInfo(url, negotiation);
    UndertowWebSocketSession session = new UndertowWebSocketSession(channel, info, this.bufferFactory,
            completion);//from w  w w . j av  a 2 s. c o  m
    UndertowWebSocketHandlerAdapter adapter = new UndertowWebSocketHandlerAdapter(session);

    channel.getReceiveSetter().set(adapter);
    channel.resumeReceives();

    handler.handle(session).subscribe(session);
}