Package org.apache.hc.client5.http.nio
Interface AsyncClientConnectionOperator
-
- All Known Implementing Classes:
DefaultAsyncClientConnectionOperator
@Contract(threading=STATELESS) @Internal public interface AsyncClientConnectionOperatorConnection operator that performs connection connect and upgrade operations.- Since:
- 5.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.util.concurrent.Future<ManagedAsyncClientConnection>connect(org.apache.hc.core5.reactor.ConnectionInitiator connectionInitiator, org.apache.hc.core5.http.HttpHost host, java.net.SocketAddress localAddress, org.apache.hc.core5.util.Timeout connectTimeout, java.lang.Object attachment, org.apache.hc.core5.concurrent.FutureCallback<ManagedAsyncClientConnection> callback)Initiates operation to create a connection to the remote endpoint using the providedConnectionInitiator.default java.util.concurrent.Future<ManagedAsyncClientConnection>connect(org.apache.hc.core5.reactor.ConnectionInitiator connectionInitiator, org.apache.hc.core5.http.HttpHost endpointHost, java.nio.file.Path unixDomainSocket, org.apache.hc.core5.net.NamedEndpoint endpointName, java.net.SocketAddress localAddress, org.apache.hc.core5.util.Timeout connectTimeout, java.lang.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 providedConnectionInitiator.default java.util.concurrent.Future<ManagedAsyncClientConnection>connect(org.apache.hc.core5.reactor.ConnectionInitiator connectionInitiator, org.apache.hc.core5.http.HttpHost endpointHost, org.apache.hc.core5.net.NamedEndpoint endpointName, java.net.SocketAddress localAddress, org.apache.hc.core5.util.Timeout connectTimeout, java.lang.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 providedConnectionInitiator.voidupgrade(ManagedAsyncClientConnection conn, org.apache.hc.core5.http.HttpHost host, java.lang.Object attachment)Upgrades transport security of the given managed connection by using the TLS security protocol.default voidupgrade(ManagedAsyncClientConnection conn, org.apache.hc.core5.http.HttpHost endpointHost, org.apache.hc.core5.net.NamedEndpoint endpointName, java.lang.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.
-
-
-
Method Detail
-
connect
java.util.concurrent.Future<ManagedAsyncClientConnection> connect(org.apache.hc.core5.reactor.ConnectionInitiator connectionInitiator, org.apache.hc.core5.http.HttpHost host, java.net.SocketAddress localAddress, org.apache.hc.core5.util.Timeout connectTimeout, java.lang.Object attachment, org.apache.hc.core5.concurrent.FutureCallback<ManagedAsyncClientConnection> callback)
Initiates operation to create a connection to the remote endpoint using the providedConnectionInitiator.- 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
default java.util.concurrent.Future<ManagedAsyncClientConnection> connect(org.apache.hc.core5.reactor.ConnectionInitiator connectionInitiator, org.apache.hc.core5.http.HttpHost endpointHost, org.apache.hc.core5.net.NamedEndpoint endpointName, java.net.SocketAddress localAddress, org.apache.hc.core5.util.Timeout connectTimeout, java.lang.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 providedConnectionInitiator.- 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,nullotherwise. 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.- Since:
- 5.4
-
connect
default java.util.concurrent.Future<ManagedAsyncClientConnection> connect(org.apache.hc.core5.reactor.ConnectionInitiator connectionInitiator, org.apache.hc.core5.http.HttpHost endpointHost, java.nio.file.Path unixDomainSocket, org.apache.hc.core5.net.NamedEndpoint endpointName, java.net.SocketAddress localAddress, org.apache.hc.core5.util.Timeout connectTimeout, java.lang.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 providedConnectionInitiator.- Parameters:
connectionInitiator- the connection initiator.endpointHost- the address of the remote endpoint.unixDomainSocket- the path to the UDS through which to connect, ornull.endpointName- the name of the remote endpoint, if different from the endpoint host name,nullotherwise. 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.- Since:
- 5.6
-
upgrade
void upgrade(ManagedAsyncClientConnection conn, org.apache.hc.core5.http.HttpHost host, java.lang.Object attachment)
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.attachment- the attachment, which can be any object representing custom parameter of the operation.
-
upgrade
default void upgrade(ManagedAsyncClientConnection conn, org.apache.hc.core5.http.HttpHost endpointHost, org.apache.hc.core5.net.NamedEndpoint endpointName, java.lang.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.- 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,nullotherwise. 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.- Since:
- 5.4
-
-