org.apache.hc.client5.http.io

## Interface HttpClientConnectionOperator

All Known Implementing Classes:
  DefaultHttpClientConnectionOperator

    @Contract(threading=STATELESS)
     @Internal
    public interface HttpClientConnectionOperator

Connection operator that performs connection connect and upgrade operations.

Since:
  4.4

### Method Summary

All Methods Instance Methods Abstract Methods Default Methods
`void` `connect(ManagedHttpClientConnection conn, HttpHost host, InetSocketAddress localAddress, TimeValue connectTimeout, SocketConfig socketConfig, HttpContext context)` Connect the given managed connection to the remote endpoint.
`default void` `connect(ManagedHttpClientConnection conn, HttpHost endpointHost, NamedEndpoint endpointName, InetSocketAddress localAddress, Timeout connectTimeout, SocketConfig socketConfig, Object attachment, HttpContext context)` Connect the given managed connection to the remote endpoint.
`default void` `connect(ManagedHttpClientConnection conn, HttpHost endpointHost, NamedEndpoint endpointName, Path unixDomainSocket, InetSocketAddress localAddress, Timeout connectTimeout, SocketConfig socketConfig, Object attachment, HttpContext context)` Connect the given managed connection to the remote endpoint.
`void` `upgrade(ManagedHttpClientConnection conn, HttpHost host, HttpContext context)` Upgrades transport security of the given managed connection by using the TLS security protocol.
`default void` `upgrade(ManagedHttpClientConnection conn, HttpHost endpointHost, NamedEndpoint endpointName, Object attachment, HttpContext context)` Upgrades transport security of the given managed connection by using the TLS security protocol.

### Method Detail

#### connect

    void connect(ManagedHttpClientConnection conn,
                 HttpHost host,
                 InetSocketAddress localAddress,
                 TimeValue connectTimeout,
                 SocketConfig socketConfig,
                 HttpContext context)
          throws IOException

Connect the given managed connection to the remote endpoint.

Parameters:
  `conn` - the managed connection.
  `host` - the address of the opposite endpoint.
  `localAddress` - the address of the local endpoint.
  `connectTimeout` - the timeout of the connect operation.
  `socketConfig` - the socket configuration.
  `context` - the execution context.
Throws:
  `IOException`

#### connect

    default void connect(ManagedHttpClientConnection conn,
                         HttpHost endpointHost,
                         NamedEndpoint endpointName,
                         InetSocketAddress localAddress,
                         Timeout connectTimeout,
                         SocketConfig socketConfig,
                         Object attachment,
                         HttpContext context)
                  throws IOException

Connect the given managed connection to the remote endpoint.

Parameters:
  `conn` - the managed connection.
  `endpointHost` - the address of the remote endpoint.
  `endpointName` - the name of the remote endpoint, if different from the endpoint host name, `null` otherwise. Usually taken from the request URU authority.
  `localAddress` - the address of the local endpoint.
  `connectTimeout` - the timeout of the connect operation.
  `socketConfig` - the socket configuration.
  `attachment` - connect request attachment.
  `context` - the execution context.
Throws:
  `IOException`
Since:
  5.4

#### connect

    default void connect(ManagedHttpClientConnection conn,
                         HttpHost endpointHost,
                         NamedEndpoint endpointName,
                         Path unixDomainSocket,
                         InetSocketAddress localAddress,
                         Timeout connectTimeout,
                         SocketConfig socketConfig,
                         Object attachment,
                         HttpContext context)
                  throws IOException

Connect the given managed connection to the remote endpoint.

Parameters:
  `conn` - the managed connection.
  `endpointHost` - the address of the remote endpoint.
  `unixDomainSocket` - the path to the Unix domain socket, or `null` if none.
  `endpointName` - the name of the remote endpoint, if different from the endpoint host name, `null` otherwise. Usually taken from the request URU authority.
  `localAddress` - the address of the local endpoint.
  `connectTimeout` - the timeout of the connect operation.
  `socketConfig` - the socket configuration.
  `attachment` - connect request attachment.
  `context` - the execution context.
Throws:
  `IOException`
Since:
  5.6

#### upgrade

    void upgrade(ManagedHttpClientConnection conn,
                 HttpHost host,
                 HttpContext context)
          throws IOException

Upgrades transport security of the given managed connection by using the TLS security protocol.

Parameters:
  `conn` - the managed connection.
  `host` - the address of the opposite endpoint with TLS security.
  `context` - the execution context.
Throws:
  `IOException`

#### upgrade

    default void upgrade(ManagedHttpClientConnection conn,
                         HttpHost endpointHost,
                         NamedEndpoint endpointName,
                         Object attachment,
                         HttpContext context)
                  throws IOException

Upgrades transport security of the given managed connection by using the TLS security protocol.

Parameters:
  `conn` - the managed connection.
  `endpointHost` - the address of the remote endpoint.
  `endpointName` - the name of the remote endpoint, if different from the endpoint host name, `null` otherwise. Usually taken from the request URU authority.
  `attachment` - connect request attachment.
  `context` - the execution context.
Throws:
  `IOException`
Since:
  5.2