org.apache.hc.client5.http.impl.nio

## Class DefaultAsyncClientConnectionOperator

- java.lang.Object
- - org.apache.hc.client5.http.impl.nio.DefaultAsyncClientConnectionOperator

- All Implemented Interfaces:
    AsyncClientConnectionOperator

      @Internal
      public class DefaultAsyncClientConnectionOperator
      extends Object
      implements AsyncClientConnectionOperator

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Future<ManagedAsyncClientConnection>` | `connect(org.apache.hc.core5.reactor.ConnectionInitiator connectionInitiator, org.apache.hc.core5.http.HttpHost endpointHost, org.apache.hc.core5.net.NamedEndpoint endpointName, SocketAddress localAddress, org.apache.hc.core5.util.Timeout connectTimeout, Object attachment, org.apache.hc.core5.http.protocol.HttpContext context, org.apache.hc.core5.concurrent.FutureCallback<ManagedAsyncClientConnection> callback)` Initiates operation to create a connection to the remote endpoint using the provided `ConnectionInitiator`.
    `Future<ManagedAsyncClientConnection>` | `connect(org.apache.hc.core5.reactor.ConnectionInitiator connectionInitiator, org.apache.hc.core5.http.HttpHost host, SocketAddress localAddress, org.apache.hc.core5.util.Timeout connectTimeout, Object attachment, org.apache.hc.core5.concurrent.FutureCallback<ManagedAsyncClientConnection> callback)` Initiates operation to create a connection to the remote endpoint using the provided `ConnectionInitiator`.
    `protected void` | `onAfterSocketConnect(org.apache.hc.core5.http.protocol.HttpContext httpContext, org.apache.hc.core5.http.HttpHost endpointHost)`
    `protected void` | `onAfterTlsHandshake(org.apache.hc.core5.http.protocol.HttpContext httpContext, org.apache.hc.core5.http.HttpHost endpointHost)`
    `protected void` | `onBeforeSocketConnect(org.apache.hc.core5.http.protocol.HttpContext httpContext, org.apache.hc.core5.http.HttpHost endpointHost)`
    `protected void` | `onBeforeTlsHandshake(org.apache.hc.core5.http.protocol.HttpContext httpContext, org.apache.hc.core5.http.HttpHost endpointHost)`
    `void` | `upgrade(ManagedAsyncClientConnection connection, org.apache.hc.core5.http.HttpHost endpointHost, org.apache.hc.core5.net.NamedEndpoint endpointName, Object attachment, org.apache.hc.core5.http.protocol.HttpContext context, org.apache.hc.core5.concurrent.FutureCallback<ManagedAsyncClientConnection> callback)` Upgrades transport security of the given managed connection by using the TLS security protocol.
    `void` | `upgrade(ManagedAsyncClientConnection connection, org.apache.hc.core5.http.HttpHost host, Object attachment)` Upgrades transport security of the given managed connection by using the TLS security protocol.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### connect

          public Future<ManagedAsyncClientConnection> connect(org.apache.hc.core5.reactor.ConnectionInitiator connectionInitiator,
                                                              org.apache.hc.core5.http.HttpHost host,
                                                              SocketAddress localAddress,
                                                              org.apache.hc.core5.util.Timeout connectTimeout,
                                                              Object attachment,
                                                              org.apache.hc.core5.concurrent.FutureCallback<ManagedAsyncClientConnection> callback)

      Description copied from interface: `AsyncClientConnectionOperator`
      Initiates operation to create a connection to the remote endpoint using the provided `ConnectionInitiator`.
      Specified by:
        `connect` in interface `AsyncClientConnectionOperator`
      Parameters:
        `connectionInitiator` - the connection initiator.
        `host` - the address of the opposite endpoint.
        `localAddress` - the address of the local endpoint.
        `connectTimeout` - the timeout of the connect operation.
        `attachment` - the attachment, which can be any object representing custom parameter of the operation.
        `callback` - the future result callback.

    - #### connect

          public Future<ManagedAsyncClientConnection> connect(org.apache.hc.core5.reactor.ConnectionInitiator connectionInitiator,
                                                              org.apache.hc.core5.http.HttpHost endpointHost,
                                                              org.apache.hc.core5.net.NamedEndpoint endpointName,
                                                              SocketAddress localAddress,
                                                              org.apache.hc.core5.util.Timeout connectTimeout,
                                                              Object attachment,
                                                              org.apache.hc.core5.http.protocol.HttpContext context,
                                                              org.apache.hc.core5.concurrent.FutureCallback<ManagedAsyncClientConnection> callback)

      Description copied from interface: `AsyncClientConnectionOperator`
      Initiates operation to create a connection to the remote endpoint using the provided `ConnectionInitiator`.
      Specified by:
        `connect` in interface `AsyncClientConnectionOperator`
      Parameters:
        `connectionInitiator` - the connection initiator.
        `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.
        `attachment` - the attachment, which can be any object representing custom parameter of the operation.
        `context` - the execution context.
        `callback` - the future result callback.

    - #### upgrade

          public void upgrade(ManagedAsyncClientConnection connection,
                              org.apache.hc.core5.http.HttpHost host,
                              Object attachment)

      Description copied from interface: `AsyncClientConnectionOperator`
      Upgrades transport security of the given managed connection by using the TLS security protocol.
      Specified by:
        `upgrade` in interface `AsyncClientConnectionOperator`
      Parameters:
        `connection` - the managed connection.
        `host` - the address of the opposite endpoint with TLS security.
        `attachment` - the attachment, which can be any object representing custom parameter of the operation.

    - #### upgrade

          public void upgrade(ManagedAsyncClientConnection connection,
                              org.apache.hc.core5.http.HttpHost endpointHost,
                              org.apache.hc.core5.net.NamedEndpoint endpointName,
                              Object attachment,
                              org.apache.hc.core5.http.protocol.HttpContext context,
                              org.apache.hc.core5.concurrent.FutureCallback<ManagedAsyncClientConnection> callback)

      Description copied from interface: `AsyncClientConnectionOperator`
      Upgrades transport security of the given managed connection by using the TLS security protocol.
      Specified by:
        `upgrade` in interface `AsyncClientConnectionOperator`
      Parameters:
        `connection` - 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` - the attachment, which can be any object representing custom parameter of the operation.
        `context` - the execution context.
        `callback` - the future result callback.

    - #### onBeforeSocketConnect

          protected void onBeforeSocketConnect(org.apache.hc.core5.http.protocol.HttpContext httpContext,
                                               org.apache.hc.core5.http.HttpHost endpointHost)

    - #### onAfterSocketConnect

          protected void onAfterSocketConnect(org.apache.hc.core5.http.protocol.HttpContext httpContext,
                                              org.apache.hc.core5.http.HttpHost endpointHost)

    - #### onBeforeTlsHandshake

          protected void onBeforeTlsHandshake(org.apache.hc.core5.http.protocol.HttpContext httpContext,
                                              org.apache.hc.core5.http.HttpHost endpointHost)

    - #### onAfterTlsHandshake

          protected void onAfterTlsHandshake(org.apache.hc.core5.http.protocol.HttpContext httpContext,
                                             org.apache.hc.core5.http.HttpHost endpointHost)

Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.