Package io.vertx.core.http

## Interface HttpClientConnection

- All Superinterfaces:
    `HttpClient`, `HttpConnection`

      @Unstable
      public interface HttpClientConnection
      extends HttpConnection, 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.

  Author:
    Julien Viet

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `long` | `activeStreams()` |
    `default Future<Void>` | `close()` | Close immediately (`shutdown(0, TimeUnit.SECONDS`).
    `long` | `maxActiveStreams()` |
    `default Future<Void>` | `shutdown()` | Shutdown with a 30 seconds timeout (`shutdown(30, TimeUnit.SECONDS)`).
    `Future<Void>` | `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.

    - ### Methods inherited from interface io.vertx.core.http.HttpClient

      `request, request, request, request, request`

    - ### Methods inherited from interface io.vertx.core.http.HttpConnection

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

- - ### Method Detail

    - #### activeStreams

          long activeStreams()

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

    - #### maxActiveStreams

          long maxActiveStreams()

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

    - #### shutdown

          default Future<Void> shutdown()

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

    - #### shutdown

          Future<Void> shutdown​(long timeout,
                                TimeUnit unit)

      Description copied from interface: `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`
      Specified by:
        `shutdown` in interface `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

          default Future<Void> close()

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