spring-framework / org.springframework.web.reactive.socket.client / UndertowWebSocketClient

UndertowWebSocketClient

open class UndertowWebSocketClient : WebSocketClientSupport, WebSocketClient

Undertow based implementation of WebSocketClient.

Author
Violeta Georgieva

Author
Rossen Stoyanchev

Since
5.0

Constructors

<init>

UndertowWebSocketClient(worker: XnioWorker)

Constructor with the XnioWorker to pass to io.undertow.websockets.client.WebSocketClient#connectionBuilder

UndertowWebSocketClient(worker: XnioWorker, builderConsumer: Consumer<ConnectionBuilder>)

Alternate constructor providing additional control over the ConnectionBuilder for each WebSocket connection.

Functions

execute

open fun execute(url: URI, handler: WebSocketHandler): Mono<Void>
open fun execute(url: URI, headers: HttpHeaders, handler: WebSocketHandler): Mono<Void>

getConnectionBuilderConsumer

open fun getConnectionBuilderConsumer(): Consumer<ConnectionBuilder>

Return the configured Consumer<ConnectionBuilder.

getPoolBufferSize

open fun getPoolBufferSize(): Int

Return the size for Undertow's WebSocketClient ByteBufferPool.

getXnioWorker

open fun getXnioWorker(): XnioWorker

Return the configured XnioWorker.

setPoolBufferSize

open fun setPoolBufferSize(poolBufferSize: Int): Unit

Configure the size of the io.undertow.connector.ByteBufferPool to pass to io.undertow.websockets.client.WebSocketClient#connectionBuilder.

By default the buffer size is set to 8192.