io.vertx.reactivex.core.http

## Class WebSocketClient

- java.lang.Object
- - io.vertx.reactivex.core.http.WebSocketClient

- All Implemented Interfaces:
    Measured

      public class WebSocketClient
      extends Object
      implements Measured

  An asynchronous WebSocket client.

  It allows you to open WebSockets to servers.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<WebSocketClient>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WebSocketClient(Object delegate)`
    `WebSocketClient(WebSocketClient delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Close the client.
    `void` | `close(Handler<AsyncResult<Void>> handler)` Close the client.
    `void` | `connect(int port, String host, String requestURI)` Connect a WebSocket to the specified port, host and relative request URI
    `void` | `connect(int port, String host, String requestURI, Handler<AsyncResult<WebSocket>> handler)` Connect a WebSocket to the specified port, host and relative request URI
    `void` | `connect(String requestURI)` Connect a WebSocket to the default client port, default client host and specified, relative request URI.
    `void` | `connect(String requestURI, Handler<AsyncResult<WebSocket>> handler)` Connect a WebSocket to the default client port, default client host and specified, relative request URI.
    `void` | `connect(String host, String requestURI)` Connect a WebSocket to the default client port and specified host and relative request URI.
    `void` | `connect(String host, String requestURI, Handler<AsyncResult<WebSocket>> handler)` Connect a WebSocket to the default client port and specified host and relative request URI.
    `void` | `connect(WebSocketConnectOptions options)` Connect a WebSocket with the specified options.
    `void` | `connect(WebSocketConnectOptions options, Handler<AsyncResult<WebSocket>> handler)` Connect a WebSocket with the specified options.
    `boolean` | `equals(Object o)`
    `WebSocketClient` | `getDelegate()`
    `int` | `hashCode()`
    `boolean` | `isMetricsEnabled()` Whether the metrics are enabled for this measured object
    `static WebSocketClient` | `newInstance(WebSocketClient arg)`
    `Completable` | `rxClose()` Close the client.
    `Single<WebSocket>` | `rxConnect(int port, String host, String requestURI)` Connect a WebSocket to the specified port, host and relative request URI
    `Single<WebSocket>` | `rxConnect(String requestURI)` Connect a WebSocket to the default client port, default client host and specified, relative request URI.
    `Single<WebSocket>` | `rxConnect(String host, String requestURI)` Connect a WebSocket to the default client port and specified host and relative request URI.
    `Single<WebSocket>` | `rxConnect(WebSocketConnectOptions options)` Connect a WebSocket with the specified options.
    `Single<Boolean>` | `rxUpdateSSLOptions(SSLOptions options)` Like `updateSSLOptions(io.vertx.core.net.SSLOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)` but supplying a handler that will be called when the update happened (or has failed).
    `Single<Boolean>` | `rxUpdateSSLOptions(SSLOptions options, boolean force)` Like `updateSSLOptions(io.vertx.core.net.SSLOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)` but supplying a handler that will be called when the update happened (or has failed).
    `String` | `toString()`
    `void` | `updateSSLOptions(SSLOptions options)` Like `updateSSLOptions(io.vertx.core.net.SSLOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)` but supplying a handler that will be called when the update happened (or has failed).
    `void` | `updateSSLOptions(SSLOptions options, boolean force)` Like `updateSSLOptions(io.vertx.core.net.SSLOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)` but supplying a handler that will be called when the update happened (or has failed).
    `void` | `updateSSLOptions(SSLOptions options, boolean force, Handler<AsyncResult<Boolean>> handler)` Like `updateSSLOptions(io.vertx.core.net.SSLOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)` but supplying a handler that will be called when the update happened (or has failed).
    `void` | `updateSSLOptions(SSLOptions options, Handler<AsyncResult<Boolean>> handler)` Like `updateSSLOptions(io.vertx.core.net.SSLOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)` but supplying a handler that will be called when the update happened (or has failed).
    `ClientWebSocket` | `webSocket()` Create a WebSocket that is not yet connected to the server.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface io.vertx.reactivex.core.metrics.Measured

      `newInstance`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<WebSocketClient> __TYPE_ARG

  - ### Constructor Detail

    - #### WebSocketClient

          public WebSocketClient(WebSocketClient delegate)

    - #### WebSocketClient

          public WebSocketClient(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public WebSocketClient getDelegate()

      Specified by:
        `getDelegate` in interface `Measured`

    - #### isMetricsEnabled

          public boolean isMetricsEnabled()

      Whether the metrics are enabled for this measured object
      Specified by:
        `isMetricsEnabled` in interface `Measured`
      Returns:
        `true` if metrics are enabled

    - #### webSocket

          public ClientWebSocket webSocket()

      Create a WebSocket that is not yet connected to the server.
      Returns:
        the client WebSocket

    - #### connect

          public void connect(int port,
                              String host,
                              String requestURI,
                              Handler<AsyncResult<WebSocket>> handler)

      Connect a WebSocket to the specified port, host and relative request URI
      Parameters:
        `port` - the port
        `host` - the host
        `requestURI` - the relative URI
        `handler` - handler that will be called with the WebSocket when connected

    - #### connect

          public void connect(int port,
                              String host,
                              String requestURI)

      Connect a WebSocket to the specified port, host and relative request URI
      Parameters:
        `port` - the port
        `host` - the host
        `requestURI` - the relative URI

    - #### rxConnect

          public Single<WebSocket> rxConnect(int port,
                                             String host,
                                             String requestURI)

      Connect a WebSocket to the specified port, host and relative request URI
      Parameters:
        `port` - the port
        `host` - the host
        `requestURI` - the relative URI
      Returns:

    - #### connect

          public void connect(String host,
                              String requestURI,
                              Handler<AsyncResult<WebSocket>> handler)

      Connect a WebSocket to the default client port and specified host and relative request URI.
      Parameters:
        `host` - the host
        `requestURI` - the relative URI
        `handler` - handler that will be called with the WebSocket when connected

    - #### connect

          public void connect(String host,
                              String requestURI)

      Connect a WebSocket to the default client port and specified host and relative request URI.
      Parameters:
        `host` - the host
        `requestURI` - the relative URI

    - #### rxConnect

          public Single<WebSocket> rxConnect(String host,
                                             String requestURI)

      Connect a WebSocket to the default client port and specified host and relative request URI.
      Parameters:
        `host` - the host
        `requestURI` - the relative URI
      Returns:

    - #### connect

          public void connect(String requestURI,
                              Handler<AsyncResult<WebSocket>> handler)

      Connect a WebSocket to the default client port, default client host and specified, relative request URI.
      Parameters:
        `requestURI` - the relative URI
        `handler` - handler that will be called with the WebSocket when connected

    - #### connect

          public void connect(String requestURI)

      Connect a WebSocket to the default client port, default client host and specified, relative request URI.
      Parameters:
        `requestURI` - the relative URI

    - #### rxConnect

          public Single<WebSocket> rxConnect(String requestURI)

      Connect a WebSocket to the default client port, default client host and specified, relative request URI.
      Parameters:
        `requestURI` - the relative URI
      Returns:

    - #### connect

          public void connect(WebSocketConnectOptions options,
                              Handler<AsyncResult<WebSocket>> handler)

      Connect a WebSocket with the specified options.
      Parameters:
        `options` - the request options
        `handler` -

    - #### connect

          public void connect(WebSocketConnectOptions options)

      Connect a WebSocket with the specified options.
      Parameters:
        `options` - the request options

    - #### rxConnect

          public Single<WebSocket> rxConnect(WebSocketConnectOptions options)

      Connect a WebSocket with the specified options.
      Parameters:
        `options` - the request options
      Returns:

    - #### updateSSLOptions

          public void updateSSLOptions(SSLOptions options,
                                       Handler<AsyncResult<Boolean>> handler)

      Like `updateSSLOptions(io.vertx.core.net.SSLOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)` but supplying a handler that will be called when the update happened (or has failed).
      Parameters:
        `options` - the new SSL options
        `handler` - the update handler

    - #### updateSSLOptions

          public void updateSSLOptions(SSLOptions options)

      Like `updateSSLOptions(io.vertx.core.net.SSLOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)` but supplying a handler that will be called when the update happened (or has failed).
      Parameters:
        `options` - the new SSL options

    - #### rxUpdateSSLOptions

          public Single<Boolean> rxUpdateSSLOptions(SSLOptions options)

      Like `updateSSLOptions(io.vertx.core.net.SSLOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)` but supplying a handler that will be called when the update happened (or has failed).
      Parameters:
        `options` - the new SSL options
      Returns:

    - #### updateSSLOptions

          public void updateSSLOptions(SSLOptions options,
                                       boolean force,
                                       Handler<AsyncResult<Boolean>> handler)

      Like `updateSSLOptions(io.vertx.core.net.SSLOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)` but supplying a handler that will be called when the update happened (or has failed).
      Parameters:
        `options` - the new SSL options
        `force` - force the update when options are equals
        `handler` - the update handler

    - #### updateSSLOptions

          public void updateSSLOptions(SSLOptions options,
                                       boolean force)

      Like `updateSSLOptions(io.vertx.core.net.SSLOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)` but supplying a handler that will be called when the update happened (or has failed).
      Parameters:
        `options` - the new SSL options
        `force` - force the update when options are equals

    - #### rxUpdateSSLOptions

          public Single<Boolean> rxUpdateSSLOptions(SSLOptions options,
                                                    boolean force)

      Like `updateSSLOptions(io.vertx.core.net.SSLOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)` but supplying a handler that will be called when the update happened (or has failed).
      Parameters:
        `options` - the new SSL options
        `force` - force the update when options are equals
      Returns:

    - #### close

          public void close(Handler<AsyncResult<Void>> handler)

      Close the client. Closing will close down any pooled connections. Clients should always be closed after use.
      Parameters:
        `handler` -

    - #### close

          public void close()

      Close the client. Closing will close down any pooled connections. Clients should always be closed after use.

    - #### rxClose

          public Completable rxClose()

      Close the client. Closing will close down any pooled connections. Clients should always be closed after use.
      Returns:

    - #### newInstance

          public static WebSocketClient newInstance(WebSocketClient arg)

Copyright © 2023 Eclipse. All rights reserved.