Package | Description |
---|---|
org.apache.hc.client5.http |
Client component APIs common to all client transports
such as connection route information and resolution
as well as common HTTP method definitions and
exception classes.
|
org.apache.hc.client5.http.async |
HTTP client APIs based on the asynchronous, event driven I/O model.
|
org.apache.hc.client5.http.classic |
HTTP client APIs based on the classic (blocking) I/O model.
|
org.apache.hc.client5.http.impl | |
org.apache.hc.client5.http.impl.classic |
Classic HTTP client API implementation that supports HTTP/1.1 transport
only.
|
org.apache.hc.client5.http.impl.io |
Client connection management functions based the classic
connection management APIs.
|
org.apache.hc.client5.http.impl.nio |
Client connection management functions based the asynchronous
connection management APIs.
|
org.apache.hc.client5.http.impl.routing |
Standard client connection routing API implementations.
|
org.apache.hc.client5.http.io |
Connection management APIs based on the classic (blocking) I/O model.
|
org.apache.hc.client5.http.nio |
Connection management APIs based on the asynchronous I/O model.
|
org.apache.hc.client5.http.protocol |
HTTP protocol interceptors that enable advanced functionality
such as HTTP state management and authentication state caching.
|
org.apache.hc.client5.http.routing |
Client connection routing APIs.
|
Modifier and Type | Method and Description |
---|---|
HttpRoute |
RouteTracker.toRoute()
Obtains the tracked route.
|
Modifier and Type | Method and Description |
---|---|
Object |
UserTokenHandler.getUserToken(HttpRoute route,
org.apache.hc.core5.http.protocol.HttpContext context)
The token object returned by this method is expected to uniquely
identify the current user if the context is user specific or to be
null if it is not. |
default Object |
UserTokenHandler.getUserToken(HttpRoute route,
org.apache.hc.core5.http.HttpRequest request,
org.apache.hc.core5.http.protocol.HttpContext context)
The token object returned by this method is expected to uniquely
identify the current user if the context is user specific or to be
null if it is not. |
Constructor and Description |
---|
RouteTracker(HttpRoute route)
Creates a new tracker for the given route.
|
Modifier and Type | Field and Description |
---|---|
HttpRoute |
AsyncExecChain.Scope.route |
Modifier and Type | Method and Description |
---|---|
org.apache.hc.core5.concurrent.Cancellable |
AsyncExecRuntime.acquireEndpoint(String id,
HttpRoute route,
Object state,
HttpClientContext context,
org.apache.hc.core5.concurrent.FutureCallback<AsyncExecRuntime> callback)
Initiates operation to acquire a connection endpoint.
|
Constructor and Description |
---|
Scope(String exchangeId,
HttpRoute route,
org.apache.hc.core5.http.HttpRequest originalRequest,
org.apache.hc.core5.concurrent.CancellableDependency cancellableDependency,
HttpClientContext clientContext,
AsyncExecRuntime execRuntime)
Deprecated.
Use
Scope#Scope(String, HttpRoute, HttpRequest, CancellableDependency, HttpClientContext,
AsyncExecRuntime, Scheduler, AtomicInteger) |
Scope(String exchangeId,
HttpRoute route,
org.apache.hc.core5.http.HttpRequest originalRequest,
org.apache.hc.core5.concurrent.CancellableDependency cancellableDependency,
HttpClientContext clientContext,
AsyncExecRuntime execRuntime,
AsyncExecChain.Scheduler scheduler,
AtomicInteger execCount) |
Modifier and Type | Field and Description |
---|---|
HttpRoute |
ExecChain.Scope.route |
Modifier and Type | Method and Description |
---|---|
void |
ExecRuntime.acquireEndpoint(String id,
HttpRoute route,
Object state,
HttpClientContext context)
Acquires a connection endpoint.
|
void |
BackoffManager.backOff(HttpRoute route)
Called when we have decided that the result of
using a connection should be interpreted as a
backoff signal.
|
void |
BackoffManager.probe(HttpRoute route)
Called when we have determined that the result of
using a connection has succeeded and that we may
probe for more connections.
|
Constructor and Description |
---|
Scope(String exchangeId,
HttpRoute route,
org.apache.hc.core5.http.ClassicHttpRequest originalRequest,
ExecRuntime execRuntime,
HttpClientContext clientContext) |
Modifier and Type | Method and Description |
---|---|
static String |
ConnPoolSupport.formatStats(HttpRoute route,
Object state,
org.apache.hc.core5.pool.ConnPoolControl<HttpRoute> connPool) |
Object |
DefaultUserTokenHandler.getUserToken(HttpRoute route,
org.apache.hc.core5.http.protocol.HttpContext context) |
Object |
NoopUserTokenHandler.getUserToken(HttpRoute route,
org.apache.hc.core5.http.protocol.HttpContext context) |
Object |
DefaultUserTokenHandler.getUserToken(HttpRoute route,
org.apache.hc.core5.http.HttpRequest request,
org.apache.hc.core5.http.protocol.HttpContext context) |
Modifier and Type | Method and Description |
---|---|
static String |
ConnPoolSupport.formatStats(HttpRoute route,
Object state,
org.apache.hc.core5.pool.ConnPoolControl<HttpRoute> connPool) |
Modifier and Type | Method and Description |
---|---|
protected org.apache.hc.core5.pool.ConnPoolControl<HttpRoute> |
AbstractBackoff.getConnPerRoute()
Returns the connection pool control for managing the maximum number of connections per route.
|
protected Map<HttpRoute,Instant> |
AbstractBackoff.getLastRouteBackoffs()
Returns the map containing the last backoff times for each HttpRoute.
|
protected Map<HttpRoute,Instant> |
AbstractBackoff.getLastRouteProbes()
Returns the map containing the last probe times for each HttpRoute.
|
Modifier and Type | Method and Description |
---|---|
void |
AbstractBackoff.backOff(HttpRoute route)
Reduces the number of maximum allowed connections for the specified route based on the exponential backoff algorithm.
|
void |
LinearBackoffManager.backOff(HttpRoute route) |
long |
AbstractBackoff.getLastUpdate(Map<HttpRoute,Long> updates,
HttpRoute route)
Retrieves the last update timestamp for the specified route from the provided updates map.
|
void |
AbstractBackoff.probe(HttpRoute route)
Increases the number of maximum allowed connections for the specified route after a successful connection has been established.
|
void |
LinearBackoffManager.probe(HttpRoute route)
Adjusts the maximum number of connections for the specified route, decreasing it by the increment value.
|
Modifier and Type | Method and Description |
---|---|
long |
AbstractBackoff.getLastUpdate(Map<HttpRoute,Long> updates,
HttpRoute route)
Retrieves the last update timestamp for the specified route from the provided updates map.
|
Constructor and Description |
---|
AbstractBackoff(org.apache.hc.core5.pool.ConnPoolControl<HttpRoute> connPerRoute)
Constructs a new ExponentialBackoffManager with the specified connection pool control.
|
AIMDBackoffManager(org.apache.hc.core5.pool.ConnPoolControl<HttpRoute> connPerRoute)
Constructs an
AIMDBackoffManager with the specified
ConnPoolControl and Clock . |
ExponentialBackoffManager(org.apache.hc.core5.pool.ConnPoolControl<HttpRoute> connPerRoute)
Constructs a new ExponentialBackoffManager with the specified connection pool control.
|
LinearBackoffManager(org.apache.hc.core5.pool.ConnPoolControl<HttpRoute> connPoolControl)
Constructs a new LinearBackoffManager with the specified connection pool control.
|
LinearBackoffManager(org.apache.hc.core5.pool.ConnPoolControl<HttpRoute> connPoolControl,
int increment)
Constructs a new LinearBackoffManager with the specified connection pool control and backoff increment.
|
Modifier and Type | Method and Description |
---|---|
Set<HttpRoute> |
PoolingHttpClientConnectionManager.getRoutes() |
Modifier and Type | Method and Description |
---|---|
int |
PoolingHttpClientConnectionManager.getMaxPerRoute(HttpRoute route) |
org.apache.hc.core5.pool.PoolStats |
PoolingHttpClientConnectionManager.getStats(HttpRoute route) |
LeaseRequest |
BasicHttpClientConnectionManager.lease(String id,
HttpRoute route,
Object state) |
LeaseRequest |
PoolingHttpClientConnectionManager.lease(String id,
HttpRoute route,
Object state) |
LeaseRequest |
BasicHttpClientConnectionManager.lease(String id,
HttpRoute route,
org.apache.hc.core5.util.Timeout requestTimeout,
Object state) |
LeaseRequest |
PoolingHttpClientConnectionManager.lease(String id,
HttpRoute route,
org.apache.hc.core5.util.Timeout requestTimeout,
Object state) |
void |
PoolingHttpClientConnectionManager.setMaxPerRoute(HttpRoute route,
int max) |
Modifier and Type | Method and Description |
---|---|
void |
PoolingHttpClientConnectionManager.setConnectionConfigResolver(org.apache.hc.core5.function.Resolver<HttpRoute,ConnectionConfig> connectionConfigResolver)
Sets
Resolver of ConnectionConfig on a per route basis. |
PoolingHttpClientConnectionManagerBuilder |
PoolingHttpClientConnectionManagerBuilder.setConnectionConfigResolver(org.apache.hc.core5.function.Resolver<HttpRoute,ConnectionConfig> connectionConfigResolver)
Sets
Resolver of ConnectionConfig on a per route basis. |
void |
PoolingHttpClientConnectionManager.setSocketConfigResolver(org.apache.hc.core5.function.Resolver<HttpRoute,org.apache.hc.core5.http.io.SocketConfig> socketConfigResolver)
Sets
Resolver of SocketConfig on a per route basis. |
PoolingHttpClientConnectionManagerBuilder |
PoolingHttpClientConnectionManagerBuilder.setSocketConfigResolver(org.apache.hc.core5.function.Resolver<HttpRoute,org.apache.hc.core5.http.io.SocketConfig> socketConfigResolver)
Sets
Resolver of SocketConfig on a per route basis. |
Constructor and Description |
---|
PoolingHttpClientConnectionManager(HttpClientConnectionOperator httpClientConnectionOperator,
org.apache.hc.core5.pool.ManagedConnPool<HttpRoute,ManagedHttpClientConnection> pool,
org.apache.hc.core5.http.io.HttpConnectionFactory<ManagedHttpClientConnection> connFactory) |
Modifier and Type | Method and Description |
---|---|
Set<HttpRoute> |
PoolingAsyncClientConnectionManager.getRoutes() |
Modifier and Type | Method and Description |
---|---|
int |
PoolingAsyncClientConnectionManager.getMaxPerRoute(HttpRoute route) |
org.apache.hc.core5.pool.PoolStats |
PoolingAsyncClientConnectionManager.getStats(HttpRoute route) |
Future<AsyncConnectionEndpoint> |
PoolingAsyncClientConnectionManager.lease(String id,
HttpRoute route,
Object state,
org.apache.hc.core5.util.Timeout requestTimeout,
org.apache.hc.core5.concurrent.FutureCallback<AsyncConnectionEndpoint> callback) |
void |
PoolingAsyncClientConnectionManager.setMaxPerRoute(HttpRoute route,
int max) |
Modifier and Type | Method and Description |
---|---|
void |
PoolingAsyncClientConnectionManager.setConnectionConfigResolver(org.apache.hc.core5.function.Resolver<HttpRoute,ConnectionConfig> connectionConfigResolver)
Sets
Resolver of ConnectionConfig on a per route basis. |
PoolingAsyncClientConnectionManagerBuilder |
PoolingAsyncClientConnectionManagerBuilder.setConnectionConfigResolver(org.apache.hc.core5.function.Resolver<HttpRoute,ConnectionConfig> connectionConfigResolver)
Sets
Resolver of ConnectionConfig on a per route basis. |
Constructor and Description |
---|
PoolingAsyncClientConnectionManager(org.apache.hc.core5.pool.ManagedConnPool<HttpRoute,ManagedAsyncClientConnection> pool,
AsyncClientConnectionOperator connectionOperator) |
Modifier and Type | Method and Description |
---|---|
HttpRoute |
DefaultRoutePlanner.determineRoute(org.apache.hc.core5.http.HttpHost host,
org.apache.hc.core5.http.protocol.HttpContext context) |
HttpRoute |
DefaultRoutePlanner.determineRoute(org.apache.hc.core5.http.HttpHost host,
org.apache.hc.core5.http.HttpRequest request,
org.apache.hc.core5.http.protocol.HttpContext context) |
Modifier and Type | Method and Description |
---|---|
LeaseRequest |
HttpClientConnectionManager.lease(String id,
HttpRoute route,
org.apache.hc.core5.util.Timeout requestTimeout,
Object state)
Returns a
LeaseRequest object which can be used to obtain
a ConnectionEndpoint to cancel the request by calling
Cancellable.cancel() . |
Modifier and Type | Method and Description |
---|---|
Future<AsyncConnectionEndpoint> |
AsyncClientConnectionManager.lease(String id,
HttpRoute route,
Object state,
org.apache.hc.core5.util.Timeout requestTimeout,
org.apache.hc.core5.concurrent.FutureCallback<AsyncConnectionEndpoint> callback)
Returns a
Future object which can be used to obtain
an AsyncConnectionEndpoint or to cancel the request by calling
Future.cancel(boolean) . |
Modifier and Type | Method and Description |
---|---|
void |
HttpClientContext.setRoute(HttpRoute route) |
Modifier and Type | Method and Description |
---|---|
HttpRoute |
HttpRoutePlanner.determineRoute(org.apache.hc.core5.http.HttpHost target,
org.apache.hc.core5.http.protocol.HttpContext context)
Determines the route for the given host.
|
default HttpRoute |
HttpRoutePlanner.determineRoute(org.apache.hc.core5.http.HttpHost target,
org.apache.hc.core5.http.HttpRequest request,
org.apache.hc.core5.http.protocol.HttpContext context)
Determines the route for the given host.
|
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.