Package io.vertx.rxjava3.core.http

## Class HttpClientConnection

- java.lang.Object
- - io.vertx.rxjava3.core.http.HttpConnection
  - - io.vertx.rxjava3.core.http.HttpClientConnection

- All Implemented Interfaces:
    `io.vertx.lang.rx.RxDelegate`, `HttpClient`

      public class HttpClientConnection
      extends HttpConnection
      implements io.vertx.lang.rx.RxDelegate, HttpClient

  Represents an HTTP client connection.

  You can use this connection to create requests to the connected server.

  Depending on the nature of the connection, requests might just be sent to the server or might be queued until a connection request is available.

  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 | Description
    --- | --- | ---
    `static io.vertx.lang.rx.TypeArg<HttpClientConnection>` | `__TYPE_ARG` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `HttpClientConnection​(HttpClientConnection delegate)` |
    `HttpClientConnection​(Object delegate)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `long` | `activeStreams()` |
    `Completable` | `close()` | Close immediately (`shutdown(0, TimeUnit.SECONDS`).
    `boolean` | `equals​(Object o)` |
    `HttpClientConnection` | `getDelegate()` |
    `int` | `hashCode()` |
    `long` | `maxActiveStreams()` |
    `static HttpClientConnection` | `newInstance​(HttpClientConnection arg)` |
    `Single<HttpClientRequest>` | `request()` | Create an HTTP request to send to the server with the default host and port of the client.
    `Single<HttpClientRequest>` | `request​(HttpMethod method, int port, String host, String requestURI)` | Create an HTTP request to send to the server at the `host` and `port`.
    `Single<HttpClientRequest>` | `request​(HttpMethod method, String requestURI)` | Create an HTTP request to send to the server at the default host and port.
    `Single<HttpClientRequest>` | `request​(HttpMethod method, String host, String requestURI)` | Create an HTTP request to send to the server at the `host` and default port.
    `Single<HttpClientRequest>` | `request​(RequestOptions options)` | Create an HTTP request to send to the server.
    `Completable` | `rxClose()` | Close immediately (`shutdown(0, TimeUnit.SECONDS`).
    `Single<HttpClientRequest>` | `rxRequest()` | Create an HTTP request to send to the server with the default host and port of the client.
    `Single<HttpClientRequest>` | `rxRequest​(HttpMethod method, int port, String host, String requestURI)` | Create an HTTP request to send to the server at the `host` and `port`.
    `Single<HttpClientRequest>` | `rxRequest​(HttpMethod method, String requestURI)` | Create an HTTP request to send to the server at the default host and port.
    `Single<HttpClientRequest>` | `rxRequest​(HttpMethod method, String host, String requestURI)` | Create an HTTP request to send to the server at the `host` and default port.
    `Single<HttpClientRequest>` | `rxRequest​(RequestOptions options)` | Create an HTTP request to send to the server.
    `Completable` | `rxShutdown()` | Shutdown with a 30 seconds timeout (`shutdown(30, TimeUnit.SECONDS)`).
    `Completable` | `rxShutdown​(long timeout, TimeUnit unit)` | Initiate a graceful connection shutdown, the connection is taken out of service and closed when all the inflight requests are processed, otherwise after a `timeout` the connection will be closed.
    `Completable` | `shutdown()` | Shutdown with a 30 seconds timeout (`shutdown(30, TimeUnit.SECONDS)`).
    `Completable` | `shutdown​(long timeout, TimeUnit unit)` | Initiate a graceful connection shutdown, the connection is taken out of service and closed when all the inflight requests are processed, otherwise after a `timeout` the connection will be closed.
    `String` | `toString()` |

    - ### Methods inherited from class io.vertx.rxjava3.core.http.HttpConnection

      `closeHandler, exceptionHandler, getWindowSize, goAway, goAway, goAway, goAwayHandler, indicatedServerName, isSsl, localAddress, localAddress, newInstance, ping, pingHandler, remoteAddress, remoteAddress, remoteSettings, remoteSettingsHandler, rxPing, rxUpdateSettings, settings, setWindowSize, shutdownHandler, sslSession, updateSettings`

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

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

- - ### Field Detail

    - #### __TYPE_ARG

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

  - ### Constructor Detail

    - #### HttpClientConnection

          public HttpClientConnection​(HttpClientConnection delegate)

    - #### HttpClientConnection

          public HttpClientConnection​(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `HttpConnection`

    - #### equals

          public boolean equals​(Object o)

      Overrides:
        `equals` in class `HttpConnection`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `HttpConnection`

    - #### getDelegate

          public HttpClientConnection getDelegate()

      Specified by:
        `getDelegate` in interface `HttpClient`
      Specified by:
        `getDelegate` in interface `io.vertx.lang.rx.RxDelegate`
      Overrides:
        `getDelegate` in class `HttpConnection`

    - #### request

          public Single<HttpClientRequest> request()

      Create an HTTP request to send to the server with the default host and port of the client.
      Specified by:
        `request` in interface `HttpClient`
      Returns:
        a future notified when the request is ready to be sent

    - #### rxRequest

          public Single<HttpClientRequest> rxRequest()

      Create an HTTP request to send to the server with the default host and port of the client.
      Specified by:
        `rxRequest` in interface `HttpClient`
      Returns:
        a future notified when the request is ready to be sent

    - #### request

          public Single<HttpClientRequest> request​(RequestOptions options)

      Create an HTTP request to send to the server.
      Specified by:
        `request` in interface `HttpClient`
      Parameters:
        `options` - the request options
      Returns:
        a future notified when the request is ready to be sent

    - #### rxRequest

          public Single<HttpClientRequest> rxRequest​(RequestOptions options)

      Create an HTTP request to send to the server.
      Specified by:
        `rxRequest` in interface `HttpClient`
      Parameters:
        `options` - the request options
      Returns:
        a future notified when the request is ready to be sent

    - #### request

          public Single<HttpClientRequest> request​(HttpMethod method,
                                                   int port,
                                                   String host,
                                                   String requestURI)

      Create an HTTP request to send to the server at the `host` and `port`.
      Specified by:
        `request` in interface `HttpClient`
      Parameters:
        `method` - the HTTP method
        `port` - the port
        `host` - the host
        `requestURI` - the relative URI
      Returns:
        a future notified when the request is ready to be sent

    - #### rxRequest

          public Single<HttpClientRequest> rxRequest​(HttpMethod method,
                                                     int port,
                                                     String host,
                                                     String requestURI)

      Create an HTTP request to send to the server at the `host` and `port`.
      Specified by:
        `rxRequest` in interface `HttpClient`
      Parameters:
        `method` - the HTTP method
        `port` - the port
        `host` - the host
        `requestURI` - the relative URI
      Returns:
        a future notified when the request is ready to be sent

    - #### request

          public Single<HttpClientRequest> request​(HttpMethod method,
                                                   String host,
                                                   String requestURI)

      Create an HTTP request to send to the server at the `host` and default port.
      Specified by:
        `request` in interface `HttpClient`
      Parameters:
        `method` - the HTTP method
        `host` - the host
        `requestURI` - the relative URI
      Returns:
        a future notified when the request is ready to be sent

    - #### rxRequest

          public Single<HttpClientRequest> rxRequest​(HttpMethod method,
                                                     String host,
                                                     String requestURI)

      Create an HTTP request to send to the server at the `host` and default port.
      Specified by:
        `rxRequest` in interface `HttpClient`
      Parameters:
        `method` - the HTTP method
        `host` - the host
        `requestURI` - the relative URI
      Returns:
        a future notified when the request is ready to be sent

    - #### request

          public Single<HttpClientRequest> request​(HttpMethod method,
                                                   String requestURI)

      Create an HTTP request to send to the server at the default host and port.
      Specified by:
        `request` in interface `HttpClient`
      Parameters:
        `method` - the HTTP method
        `requestURI` - the relative URI
      Returns:
        a future notified when the request is ready to be sent

    - #### rxRequest

          public Single<HttpClientRequest> rxRequest​(HttpMethod method,
                                                     String requestURI)

      Create an HTTP request to send to the server at the default host and port.
      Specified by:
        `rxRequest` in interface `HttpClient`
      Parameters:
        `method` - the HTTP method
        `requestURI` - the relative URI
      Returns:
        a future notified when the request is ready to be sent

    - #### activeStreams

          public long activeStreams()

      Returns:
        the number of active request/response (streams)

    - #### maxActiveStreams

          public long maxActiveStreams()

      Returns:
        the max number of concurrent active streams this connection can handle

    - #### shutdown

          public Completable shutdown()

      Description copied from class: `HttpConnection`
      Shutdown with a 30 seconds timeout (`shutdown(30, TimeUnit.SECONDS)`).
      Specified by:
        `shutdown` in interface `HttpClient`
      Overrides:
        `shutdown` in class `HttpConnection`
      Returns:
        a future completed when shutdown has completed

    - #### rxShutdown

          public Completable rxShutdown()

      Description copied from class: `HttpConnection`
      Shutdown with a 30 seconds timeout (`shutdown(30, TimeUnit.SECONDS)`).
      Specified by:
        `rxShutdown` in interface `HttpClient`
      Overrides:
        `rxShutdown` in class `HttpConnection`
      Returns:
        a future completed when shutdown has completed

    - #### shutdown

          public Completable shutdown​(long timeout,
                                      TimeUnit unit)

      Description copied from class: `HttpConnection`
      Initiate a graceful connection shutdown, the connection is taken out of service and closed when all the inflight requests are processed, otherwise after a `timeout` the connection will be closed. Client connection are immediately removed from the pool.
      - HTTP/2 connections will send a go away frame immediately to signal the other side the connection will close.
      - HTTP/1.x connection will be closed.
      Specified by:
        `shutdown` in interface `HttpClient`
      Overrides:
        `shutdown` in class `HttpConnection`
      Parameters:
        `timeout` - the amount of time after which all resources are forcibly closed
        `unit` - the of the timeout
      Returns:
        a future completed when shutdown has completed

    - #### rxShutdown

          public Completable rxShutdown​(long timeout,
                                        TimeUnit unit)

      Description copied from class: `HttpConnection`
      Initiate a graceful connection shutdown, the connection is taken out of service and closed when all the inflight requests are processed, otherwise after a `timeout` the connection will be closed. Client connection are immediately removed from the pool.
      - HTTP/2 connections will send a go away frame immediately to signal the other side the connection will close.
      - HTTP/1.x connection will be closed.
      Specified by:
        `rxShutdown` in interface `HttpClient`
      Overrides:
        `rxShutdown` in class `HttpConnection`
      Parameters:
        `timeout` - the amount of time after which all resources are forcibly closed
        `unit` - the of the timeout
      Returns:
        a future completed when shutdown has completed

    - #### close

          public Completable close()

      Description copied from class: `HttpConnection`
      Close immediately (`shutdown(0, TimeUnit.SECONDS`).
      Specified by:
        `close` in interface `HttpClient`
      Overrides:
        `close` in class `HttpConnection`
      Returns:
        a future notified when the client is closed

    - #### rxClose

          public Completable rxClose()

      Description copied from class: `HttpConnection`
      Close immediately (`shutdown(0, TimeUnit.SECONDS`).
      Specified by:
        `rxClose` in interface `HttpClient`
      Overrides:
        `rxClose` in class `HttpConnection`
      Returns:
        a future notified when the client is closed

    - #### newInstance

          public static HttpClientConnection newInstance​(HttpClientConnection arg)