| 程序包 | 说明 |
|---|---|
| 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.routing |
Client connection routing APIs.
|
| 限定符和类型 | 方法和说明 |
|---|---|
HttpRoute |
RouteTracker.toRoute()
Obtains the tracked route.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
UserTokenHandler.getUserToken(HttpRoute route,
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,
HttpRequest request,
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. |
| 构造器和说明 |
|---|
RouteTracker(HttpRoute route)
Creates a new tracker for the given route.
|
| 限定符和类型 | 字段和说明 |
|---|---|
HttpRoute |
AsyncExecChain.Scope.route |
| 限定符和类型 | 方法和说明 |
|---|---|
Cancellable |
AsyncExecRuntime.acquireEndpoint(String id,
HttpRoute route,
Object state,
HttpClientContext context,
FutureCallback<AsyncExecRuntime> callback)
Initiates operation to acquire a connection endpoint.
|
| 构造器和说明 |
|---|
Scope(String exchangeId,
HttpRoute route,
HttpRequest originalRequest,
CancellableDependency cancellableDependency,
HttpClientContext clientContext,
AsyncExecRuntime execRuntime)
已过时。
Use
Scope#Scope(String, HttpRoute, HttpRequest, CancellableDependency, HttpClientContext,
AsyncExecRuntime, Scheduler, AtomicInteger) |
Scope(String exchangeId,
HttpRoute route,
HttpRequest originalRequest,
CancellableDependency cancellableDependency,
HttpClientContext clientContext,
AsyncExecRuntime execRuntime,
AsyncExecChain.Scheduler scheduler,
AtomicInteger execCount) |
| 限定符和类型 | 字段和说明 |
|---|---|
HttpRoute |
ExecChain.Scope.route |
| 限定符和类型 | 方法和说明 |
|---|---|
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.
|
| 构造器和说明 |
|---|
Scope(String exchangeId,
HttpRoute route,
ClassicHttpRequest originalRequest,
ExecRuntime execRuntime,
HttpClientContext clientContext) |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
ConnPoolSupport.formatStats(HttpRoute route,
Object state,
ConnPoolControl<HttpRoute> connPool) |
Object |
DefaultUserTokenHandler.getUserToken(HttpRoute route,
HttpContext context) |
Object |
NoopUserTokenHandler.getUserToken(HttpRoute route,
HttpContext context) |
Object |
DefaultUserTokenHandler.getUserToken(HttpRoute route,
HttpRequest request,
HttpContext context) |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
ConnPoolSupport.formatStats(HttpRoute route,
Object state,
ConnPoolControl<HttpRoute> connPool) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected 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.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
LinearBackoffManager.backOff(HttpRoute route) |
void |
AbstractBackoff.backOff(HttpRoute route)
Reduces the number of maximum allowed connections for the specified route based on the exponential backoff algorithm.
|
long |
AbstractBackoff.getLastUpdate(Map<HttpRoute,Long> updates,
HttpRoute route)
Retrieves the last update timestamp for the specified route from the provided updates map.
|
void |
LinearBackoffManager.probe(HttpRoute route)
Adjusts the maximum number of connections for the specified route, decreasing it by the increment value.
|
void |
AbstractBackoff.probe(HttpRoute route)
Increases the number of maximum allowed connections for the specified route after a successful connection has been established.
|
| 限定符和类型 | 方法和说明 |
|---|---|
long |
AbstractBackoff.getLastUpdate(Map<HttpRoute,Long> updates,
HttpRoute route)
Retrieves the last update timestamp for the specified route from the provided updates map.
|
| 构造器和说明 |
|---|
AbstractBackoff(ConnPoolControl<HttpRoute> connPerRoute)
Constructs a new ExponentialBackoffManager with the specified connection pool control.
|
AIMDBackoffManager(ConnPoolControl<HttpRoute> connPerRoute)
|
ExponentialBackoffManager(ConnPoolControl<HttpRoute> connPerRoute)
Constructs a new ExponentialBackoffManager with the specified connection pool control.
|
LinearBackoffManager(ConnPoolControl<HttpRoute> connPoolControl)
Constructs a new LinearBackoffManager with the specified connection pool control.
|
LinearBackoffManager(ConnPoolControl<HttpRoute> connPoolControl,
int increment)
Constructs a new LinearBackoffManager with the specified connection pool control and backoff increment.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Set<HttpRoute> |
PoolingHttpClientConnectionManager.getRoutes() |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
PoolingHttpClientConnectionManager.getMaxPerRoute(HttpRoute route) |
PoolStats |
PoolingHttpClientConnectionManager.getStats(HttpRoute route) |
LeaseRequest |
PoolingHttpClientConnectionManager.lease(String id,
HttpRoute route,
Object state) |
LeaseRequest |
BasicHttpClientConnectionManager.lease(String id,
HttpRoute route,
Object state) |
LeaseRequest |
PoolingHttpClientConnectionManager.lease(String id,
HttpRoute route,
Timeout requestTimeout,
Object state) |
LeaseRequest |
BasicHttpClientConnectionManager.lease(String id,
HttpRoute route,
Timeout requestTimeout,
Object state) |
void |
PoolingHttpClientConnectionManager.setMaxPerRoute(HttpRoute route,
int max) |
| 限定符和类型 | 方法和说明 |
|---|---|
PoolingHttpClientConnectionManagerBuilder |
PoolingHttpClientConnectionManagerBuilder.setConnectionConfigResolver(Resolver<HttpRoute,ConnectionConfig> connectionConfigResolver)
Assigns
Resolver of ConnectionConfig on a per route basis. |
void |
PoolingHttpClientConnectionManager.setConnectionConfigResolver(Resolver<HttpRoute,ConnectionConfig> connectionConfigResolver)
Sets
Resolver of ConnectionConfig on a per route basis. |
PoolingHttpClientConnectionManagerBuilder |
PoolingHttpClientConnectionManagerBuilder.setSocketConfigResolver(Resolver<HttpRoute,SocketConfig> socketConfigResolver)
Assigns
Resolver of SocketConfig on a per route basis. |
void |
PoolingHttpClientConnectionManager.setSocketConfigResolver(Resolver<HttpRoute,SocketConfig> socketConfigResolver)
Sets
Resolver of SocketConfig on a per route basis. |
| 构造器和说明 |
|---|
PoolingHttpClientConnectionManager(HttpClientConnectionOperator httpClientConnectionOperator,
ManagedConnPool<HttpRoute,ManagedHttpClientConnection> pool,
HttpConnectionFactory<ManagedHttpClientConnection> connFactory) |
| 限定符和类型 | 方法和说明 |
|---|---|
Set<HttpRoute> |
PoolingAsyncClientConnectionManager.getRoutes() |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
PoolingAsyncClientConnectionManager.getMaxPerRoute(HttpRoute route) |
PoolStats |
PoolingAsyncClientConnectionManager.getStats(HttpRoute route) |
Future<AsyncConnectionEndpoint> |
PoolingAsyncClientConnectionManager.lease(String id,
HttpRoute route,
Object state,
Timeout requestTimeout,
FutureCallback<AsyncConnectionEndpoint> callback) |
void |
PoolingAsyncClientConnectionManager.setMaxPerRoute(HttpRoute route,
int max) |
| 限定符和类型 | 方法和说明 |
|---|---|
PoolingAsyncClientConnectionManagerBuilder |
PoolingAsyncClientConnectionManagerBuilder.setConnectionConfigResolver(Resolver<HttpRoute,ConnectionConfig> connectionConfigResolver)
Assigns
Resolver of ConnectionConfig on a per route basis. |
void |
PoolingAsyncClientConnectionManager.setConnectionConfigResolver(Resolver<HttpRoute,ConnectionConfig> connectionConfigResolver)
Sets
Resolver of ConnectionConfig on a per route basis. |
| 构造器和说明 |
|---|
PoolingAsyncClientConnectionManager(ManagedConnPool<HttpRoute,ManagedAsyncClientConnection> pool,
AsyncClientConnectionOperator connectionOperator) |
| 限定符和类型 | 方法和说明 |
|---|---|
HttpRoute |
DefaultRoutePlanner.determineRoute(HttpHost host,
HttpContext context) |
| 限定符和类型 | 方法和说明 |
|---|---|
LeaseRequest |
HttpClientConnectionManager.lease(String id,
HttpRoute route,
Timeout requestTimeout,
Object state)
Returns a
LeaseRequest object which can be used to obtain
a ConnectionEndpoint to cancel the request by calling
Cancellable.cancel(). |
| 限定符和类型 | 方法和说明 |
|---|---|
Future<AsyncConnectionEndpoint> |
AsyncClientConnectionManager.lease(String id,
HttpRoute route,
Object state,
Timeout requestTimeout,
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). |
| 限定符和类型 | 方法和说明 |
|---|---|
HttpRoute |
HttpRoutePlanner.determineRoute(HttpHost target,
HttpContext context)
Determines the route for the given host.
|
Copyright © 2023. All rights reserved.