Class UndertowWebSocketClient

java.lang.Object
org.springframework.web.reactive.socket.client.UndertowWebSocketClient
All Implemented Interfaces:
WebSocketClient

@Deprecated(since="6.2.18", forRemoval=true) public class UndertowWebSocketClient extends Object implements WebSocketClient
Deprecated, for removal: This API element is subject to removal in a future version.
as of 6.2.18 with no replacement
Undertow based implementation of WebSocketClient.
Since:
5.0
Author:
Violeta Georgieva, Rossen Stoyanchev
  • Constructor Summary

    Constructors
    Constructor
    Description
    UndertowWebSocketClient(org.xnio.XnioWorker worker)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructor with the XnioWorker to pass to WebSocketClient.connectionBuilder(org.xnio.XnioWorker, io.undertow.connector.ByteBufferPool, java.net.URI).
    UndertowWebSocketClient(org.xnio.XnioWorker worker, io.undertow.connector.ByteBufferPool byteBufferPool, Consumer<io.undertow.websockets.client.WebSocketClient.ConnectionBuilder> builderConsumer)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Alternate constructor providing additional control over the WebSocketClient.ConnectionBuilder for each WebSocket connection.
    UndertowWebSocketClient(org.xnio.XnioWorker worker, Consumer<io.undertow.websockets.client.WebSocketClient.ConnectionBuilder> builderConsumer)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Alternate constructor providing additional control over the WebSocketClient.ConnectionBuilder for each WebSocket connection.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected io.undertow.websockets.client.WebSocketClient.ConnectionBuilder
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create a WebSocketClient.ConnectionBuilder for the given URI.
    reactor.core.publisher.Mono<Void>
    execute(URI url, HttpHeaders headers, WebSocketHandler handler)
    Deprecated, for removal: This API element is subject to removal in a future version.
    A variant of WebSocketClient.execute(URI, WebSocketHandler) with custom headers.
    reactor.core.publisher.Mono<Void>
    execute(URI url, WebSocketHandler handler)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Execute a handshake request to the given url and handle the resulting WebSocket session with the given handler.
    io.undertow.connector.ByteBufferPool
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return the ByteBufferPool currently used for newly created WebSocket sessions by this client.
    Consumer<io.undertow.websockets.client.WebSocketClient.ConnectionBuilder>
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return the configured Consumer<ConnectionBuilder>.
    org.xnio.XnioWorker
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return the configured XnioWorker.
    void
    setByteBufferPool(io.undertow.connector.ByteBufferPool byteBufferPool)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set the ByteBufferPool to pass to WebSocketClient.connectionBuilder(org.xnio.XnioWorker, io.undertow.connector.ByteBufferPool, java.net.URI).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • UndertowWebSocketClient

      public UndertowWebSocketClient(org.xnio.XnioWorker worker)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructor with the XnioWorker to pass to WebSocketClient.connectionBuilder(org.xnio.XnioWorker, io.undertow.connector.ByteBufferPool, java.net.URI).
      Parameters:
      worker - the Xnio worker
    • UndertowWebSocketClient

      public UndertowWebSocketClient(org.xnio.XnioWorker worker, Consumer<io.undertow.websockets.client.WebSocketClient.ConnectionBuilder> builderConsumer)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Alternate constructor providing additional control over the WebSocketClient.ConnectionBuilder for each WebSocket connection.
      Parameters:
      worker - the Xnio worker to use to create ConnectionBuilder's
      builderConsumer - a consumer to configure ConnectionBuilder's
    • UndertowWebSocketClient

      public UndertowWebSocketClient(org.xnio.XnioWorker worker, io.undertow.connector.ByteBufferPool byteBufferPool, Consumer<io.undertow.websockets.client.WebSocketClient.ConnectionBuilder> builderConsumer)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Alternate constructor providing additional control over the WebSocketClient.ConnectionBuilder for each WebSocket connection.
      Parameters:
      worker - the Xnio worker to use to create ConnectionBuilder's
      byteBufferPool - the ByteBufferPool to use to create ConnectionBuilder's
      builderConsumer - a consumer to configure ConnectionBuilder's
      Since:
      5.0.8
  • Method Details

    • getXnioWorker

      public org.xnio.XnioWorker getXnioWorker()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return the configured XnioWorker.
    • setByteBufferPool

      public void setByteBufferPool(io.undertow.connector.ByteBufferPool byteBufferPool)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the ByteBufferPool to pass to WebSocketClient.connectionBuilder(org.xnio.XnioWorker, io.undertow.connector.ByteBufferPool, java.net.URI).

      By default an indirect DefaultByteBufferPool with a buffer size of 8192 is used.

      Since:
      5.0.8
      See Also:
      • DEFAULT_POOL_BUFFER_SIZE
    • getByteBufferPool

      public io.undertow.connector.ByteBufferPool getByteBufferPool()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return the ByteBufferPool currently used for newly created WebSocket sessions by this client.
      Returns:
      the byte buffer pool
      Since:
      5.0.8
    • getConnectionBuilderConsumer

      public Consumer<io.undertow.websockets.client.WebSocketClient.ConnectionBuilder> getConnectionBuilderConsumer()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return the configured Consumer<ConnectionBuilder>.
    • execute

      public reactor.core.publisher.Mono<Void> execute(URI url, WebSocketHandler handler)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: WebSocketClient
      Execute a handshake request to the given url and handle the resulting WebSocket session with the given handler.
      Specified by:
      execute in interface WebSocketClient
      Parameters:
      url - the handshake url
      handler - the handler of the WebSocket session
      Returns:
      completion Mono<Void> to indicate the outcome of the WebSocket session handling.
    • execute

      public reactor.core.publisher.Mono<Void> execute(URI url, HttpHeaders headers, WebSocketHandler handler)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: WebSocketClient
      A variant of WebSocketClient.execute(URI, WebSocketHandler) with custom headers.
      Specified by:
      execute in interface WebSocketClient
      Parameters:
      url - the handshake url
      headers - custom headers for the handshake request
      handler - the handler of the WebSocket session
      Returns:
      completion Mono<Void> to indicate the outcome of the WebSocket session handling.
    • createConnectionBuilder

      protected io.undertow.websockets.client.WebSocketClient.ConnectionBuilder createConnectionBuilder(URI url)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create a WebSocketClient.ConnectionBuilder for the given URI.

      The default implementation creates a builder with the configured XnioWorker and ByteBufferPool and then passes it to the consumer provided at construction time.