@Internal @Contract(threading=STATELESS) public class DefaultHttpClientConnectionOperator extends Object implements HttpClientConnectionOperator
HttpClientConnectionOperator used as default in Http client,
when no instance provided by user to BasicHttpClientConnectionManager or PoolingHttpClientConnectionManager constructor.| Constructor and Description |
|---|
DefaultHttpClientConnectionOperator(DetachedSocketFactory detachedSocketFactory,
SchemePortResolver schemePortResolver,
DnsResolver dnsResolver,
org.apache.hc.core5.http.config.Lookup<TlsSocketStrategy> tlsSocketStrategyLookup) |
DefaultHttpClientConnectionOperator(org.apache.hc.core5.http.config.Lookup<ConnectionSocketFactory> socketFactoryRegistry,
SchemePortResolver schemePortResolver,
DnsResolver dnsResolver)
Deprecated.
Do not use.
|
DefaultHttpClientConnectionOperator(SchemePortResolver schemePortResolver,
DnsResolver dnsResolver,
org.apache.hc.core5.http.config.Lookup<TlsSocketStrategy> tlsSocketStrategyLookup) |
| Modifier and Type | Method and Description |
|---|---|
void |
connect(ManagedHttpClientConnection conn,
org.apache.hc.core5.http.HttpHost host,
InetSocketAddress localAddress,
org.apache.hc.core5.util.TimeValue connectTimeout,
org.apache.hc.core5.http.io.SocketConfig socketConfig,
org.apache.hc.core5.http.protocol.HttpContext context)
Connect the given managed connection to the remote endpoint.
|
void |
connect(ManagedHttpClientConnection conn,
org.apache.hc.core5.http.HttpHost endpointHost,
org.apache.hc.core5.net.NamedEndpoint endpointName,
InetSocketAddress localAddress,
org.apache.hc.core5.util.Timeout connectTimeout,
org.apache.hc.core5.http.io.SocketConfig socketConfig,
Object attachment,
org.apache.hc.core5.http.protocol.HttpContext context)
Connect the given managed connection to the remote endpoint.
|
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(ManagedHttpClientConnection conn,
org.apache.hc.core5.http.HttpHost host,
org.apache.hc.core5.http.protocol.HttpContext context)
Upgrades transport security of the given managed connection
by using the TLS security protocol.
|
void |
upgrade(ManagedHttpClientConnection conn,
org.apache.hc.core5.http.HttpHost endpointHost,
org.apache.hc.core5.net.NamedEndpoint endpointName,
Object attachment,
org.apache.hc.core5.http.protocol.HttpContext context)
Upgrades transport security of the given managed connection
by using the TLS security protocol.
|
public DefaultHttpClientConnectionOperator(DetachedSocketFactory detachedSocketFactory, SchemePortResolver schemePortResolver, DnsResolver dnsResolver, org.apache.hc.core5.http.config.Lookup<TlsSocketStrategy> tlsSocketStrategyLookup)
@Deprecated public DefaultHttpClientConnectionOperator(org.apache.hc.core5.http.config.Lookup<ConnectionSocketFactory> socketFactoryRegistry, SchemePortResolver schemePortResolver, DnsResolver dnsResolver)
public DefaultHttpClientConnectionOperator(SchemePortResolver schemePortResolver, DnsResolver dnsResolver, org.apache.hc.core5.http.config.Lookup<TlsSocketStrategy> tlsSocketStrategyLookup)
public void connect(ManagedHttpClientConnection conn, org.apache.hc.core5.http.HttpHost host, InetSocketAddress localAddress, org.apache.hc.core5.util.TimeValue connectTimeout, org.apache.hc.core5.http.io.SocketConfig socketConfig, org.apache.hc.core5.http.protocol.HttpContext context) throws IOException
HttpClientConnectionOperatorconnect in interface HttpClientConnectionOperatorconn - 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.IOExceptionpublic void connect(ManagedHttpClientConnection conn, org.apache.hc.core5.http.HttpHost endpointHost, org.apache.hc.core5.net.NamedEndpoint endpointName, InetSocketAddress localAddress, org.apache.hc.core5.util.Timeout connectTimeout, org.apache.hc.core5.http.io.SocketConfig socketConfig, Object attachment, org.apache.hc.core5.http.protocol.HttpContext context) throws IOException
HttpClientConnectionOperatorconnect in interface HttpClientConnectionOperatorconn - 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.IOExceptionpublic void upgrade(ManagedHttpClientConnection conn, org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.protocol.HttpContext context) throws IOException
HttpClientConnectionOperatorupgrade in interface HttpClientConnectionOperatorconn - the managed connection.host - the address of the opposite endpoint with TLS security.context - the execution context.IOExceptionpublic void upgrade(ManagedHttpClientConnection conn, org.apache.hc.core5.http.HttpHost endpointHost, org.apache.hc.core5.net.NamedEndpoint endpointName, Object attachment, org.apache.hc.core5.http.protocol.HttpContext context) throws IOException
HttpClientConnectionOperatorupgrade in interface HttpClientConnectionOperatorconn - 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.IOExceptionprotected void onBeforeSocketConnect(org.apache.hc.core5.http.protocol.HttpContext httpContext,
org.apache.hc.core5.http.HttpHost endpointHost)
protected void onAfterSocketConnect(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)
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.