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

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

Introduction

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

Prototype

public UndertowWebSocketHandlerAdapter(UndertowWebSocketSession session) 

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 ww .java  2 s  . c  o  m*/
    UndertowWebSocketHandlerAdapter adapter = new UndertowWebSocketHandlerAdapter(session);

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

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