@Internal public class DefaultAsyncClientConnectionOperator extends Object implements AsyncClientConnectionOperator
| Modifier | Constructor and Description |
|---|---|
protected |
DefaultAsyncClientConnectionOperator(Lookup<TlsStrategy> tlsStrategyLookup,
SchemePortResolver schemePortResolver,
DnsResolver dnsResolver)
Constructs a new
DefaultAsyncClientConnectionOperator. |
| Modifier and Type | Method and Description |
|---|---|
Future<ManagedAsyncClientConnection> |
connect(ConnectionInitiator connectionInitiator,
HttpHost endpointHost,
NamedEndpoint endpointName,
SocketAddress localAddress,
Timeout connectTimeout,
Object attachment,
HttpContext context,
FutureCallback<ManagedAsyncClientConnection> callback)
Initiates operation to create a connection to the remote endpoint using
the provided
ConnectionInitiator. |
Future<ManagedAsyncClientConnection> |
connect(ConnectionInitiator connectionInitiator,
HttpHost endpointHost,
Path unixDomainSocket,
NamedEndpoint endpointName,
SocketAddress localAddress,
Timeout connectTimeout,
Object attachment,
HttpContext context,
FutureCallback<ManagedAsyncClientConnection> callback)
Initiates operation to create a connection to the remote endpoint using
the provided
ConnectionInitiator. |
Future<ManagedAsyncClientConnection> |
connect(ConnectionInitiator connectionInitiator,
HttpHost host,
SocketAddress localAddress,
Timeout connectTimeout,
Object attachment,
FutureCallback<ManagedAsyncClientConnection> callback)
Initiates operation to create a connection to the remote endpoint using
the provided
ConnectionInitiator. |
protected void |
onAfterSocketConnect(HttpContext httpContext,
HttpHost endpointHost) |
protected void |
onAfterTlsHandshake(HttpContext httpContext,
HttpHost endpointHost) |
protected void |
onBeforeSocketConnect(HttpContext httpContext,
HttpHost endpointHost) |
protected void |
onBeforeTlsHandshake(HttpContext httpContext,
HttpHost endpointHost) |
void |
upgrade(ManagedAsyncClientConnection connection,
HttpHost endpointHost,
NamedEndpoint endpointName,
Object attachment,
HttpContext context,
FutureCallback<ManagedAsyncClientConnection> callback)
Upgrades transport security of the given managed connection
by using the TLS security protocol.
|
void |
upgrade(ManagedAsyncClientConnection connection,
HttpHost host,
Object attachment)
Upgrades transport security of the given managed connection
by using the TLS security protocol.
|
protected DefaultAsyncClientConnectionOperator(Lookup<TlsStrategy> tlsStrategyLookup, SchemePortResolver schemePortResolver, DnsResolver dnsResolver)
DefaultAsyncClientConnectionOperator.
Note: this class is marked @Internal; rely on it
only if you are prepared for incompatible changes in a future major
release. Typical client code should use the high-level builders in
HttpAsyncClients instead.
public Future<ManagedAsyncClientConnection> connect(ConnectionInitiator connectionInitiator, HttpHost host, SocketAddress localAddress, Timeout connectTimeout, Object attachment, FutureCallback<ManagedAsyncClientConnection> callback)
AsyncClientConnectionOperatorConnectionInitiator.connect in interface AsyncClientConnectionOperatorconnectionInitiator - 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.public Future<ManagedAsyncClientConnection> connect(ConnectionInitiator connectionInitiator, HttpHost endpointHost, NamedEndpoint endpointName, SocketAddress localAddress, Timeout connectTimeout, Object attachment, HttpContext context, FutureCallback<ManagedAsyncClientConnection> callback)
AsyncClientConnectionOperatorConnectionInitiator.connect in interface AsyncClientConnectionOperatorconnectionInitiator - 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.public Future<ManagedAsyncClientConnection> connect(ConnectionInitiator connectionInitiator, HttpHost endpointHost, Path unixDomainSocket, NamedEndpoint endpointName, SocketAddress localAddress, Timeout connectTimeout, Object attachment, HttpContext context, FutureCallback<ManagedAsyncClientConnection> callback)
AsyncClientConnectionOperatorConnectionInitiator.connect in interface AsyncClientConnectionOperatorconnectionInitiator - the connection initiator.endpointHost - the address of the remote endpoint.unixDomainSocket - the path to the UDS through which to connect, or null.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.public void upgrade(ManagedAsyncClientConnection connection, HttpHost host, Object attachment)
AsyncClientConnectionOperatorupgrade in interface AsyncClientConnectionOperatorconnection - 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.public void upgrade(ManagedAsyncClientConnection connection, HttpHost endpointHost, NamedEndpoint endpointName, Object attachment, HttpContext context, FutureCallback<ManagedAsyncClientConnection> callback)
AsyncClientConnectionOperatorupgrade in interface AsyncClientConnectionOperatorconnection - 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.protected void onBeforeSocketConnect(HttpContext httpContext, HttpHost endpointHost)
protected void onAfterSocketConnect(HttpContext httpContext, HttpHost endpointHost)
protected void onBeforeTlsHandshake(HttpContext httpContext, HttpHost endpointHost)
protected void onAfterTlsHandshake(HttpContext httpContext, HttpHost endpointHost)
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.