class InternalHttpAsyncClient extends CloseableHttpAsyncClientBase
CloseableHttpAsyncClientBase.Status| Modifier and Type | Field and Description |
|---|---|
private org.apache.http.config.Lookup<org.apache.http.auth.AuthSchemeProvider> |
authSchemeRegistry |
private NHttpClientConnectionManager |
connmgr |
private org.apache.http.ConnectionReuseStrategy |
connReuseStrategy |
private org.apache.http.config.Lookup<org.apache.http.cookie.CookieSpecProvider> |
cookieSpecRegistry |
private org.apache.http.client.CookieStore |
cookieStore |
private org.apache.http.client.CredentialsProvider |
credentialsProvider |
private org.apache.http.client.config.RequestConfig |
defaultConfig |
private InternalClientExec |
exec |
private org.apache.http.conn.ConnectionKeepAliveStrategy |
keepaliveStrategy |
private org.apache.commons.logging.Log |
log |
| Constructor and Description |
|---|
InternalHttpAsyncClient(NHttpClientConnectionManager connmgr,
org.apache.http.ConnectionReuseStrategy connReuseStrategy,
org.apache.http.conn.ConnectionKeepAliveStrategy keepaliveStrategy,
java.util.concurrent.ThreadFactory threadFactory,
org.apache.http.nio.NHttpClientEventHandler handler,
InternalClientExec exec,
org.apache.http.config.Lookup<org.apache.http.cookie.CookieSpecProvider> cookieSpecRegistry,
org.apache.http.config.Lookup<org.apache.http.auth.AuthSchemeProvider> authSchemeRegistry,
org.apache.http.client.CookieStore cookieStore,
org.apache.http.client.CredentialsProvider credentialsProvider,
org.apache.http.client.config.RequestConfig defaultConfig) |
| Modifier and Type | Method and Description |
|---|---|
<T> java.util.concurrent.Future<T> |
execute(org.apache.http.nio.protocol.HttpAsyncRequestProducer requestProducer,
org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> responseConsumer,
org.apache.http.protocol.HttpContext context,
org.apache.http.concurrent.FutureCallback<T> callback)
Initiates asynchronous HTTP request execution using the given context.
|
<T> java.util.concurrent.Future<java.util.List<T>> |
execute(org.apache.http.HttpHost target,
java.util.List<? extends org.apache.http.nio.protocol.HttpAsyncRequestProducer> requestProducers,
java.util.List<? extends org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>> responseConsumers,
org.apache.http.protocol.HttpContext context,
org.apache.http.concurrent.FutureCallback<java.util.List<T>> callback)
Initiates pipelined execution of a sequence of requests.
|
private void |
setupContext(org.apache.http.client.protocol.HttpClientContext context) |
close, ensureRunning, isRunning, startexecute, execute, executeexecute, execute, execute, execute, executeprivate final org.apache.commons.logging.Log log
private final NHttpClientConnectionManager connmgr
private final org.apache.http.ConnectionReuseStrategy connReuseStrategy
private final org.apache.http.conn.ConnectionKeepAliveStrategy keepaliveStrategy
private final InternalClientExec exec
private final org.apache.http.config.Lookup<org.apache.http.cookie.CookieSpecProvider> cookieSpecRegistry
private final org.apache.http.config.Lookup<org.apache.http.auth.AuthSchemeProvider> authSchemeRegistry
private final org.apache.http.client.CookieStore cookieStore
private final org.apache.http.client.CredentialsProvider credentialsProvider
private final org.apache.http.client.config.RequestConfig defaultConfig
public InternalHttpAsyncClient(NHttpClientConnectionManager connmgr, org.apache.http.ConnectionReuseStrategy connReuseStrategy, org.apache.http.conn.ConnectionKeepAliveStrategy keepaliveStrategy, java.util.concurrent.ThreadFactory threadFactory, org.apache.http.nio.NHttpClientEventHandler handler, InternalClientExec exec, org.apache.http.config.Lookup<org.apache.http.cookie.CookieSpecProvider> cookieSpecRegistry, org.apache.http.config.Lookup<org.apache.http.auth.AuthSchemeProvider> authSchemeRegistry, org.apache.http.client.CookieStore cookieStore, org.apache.http.client.CredentialsProvider credentialsProvider, org.apache.http.client.config.RequestConfig defaultConfig)
private void setupContext(org.apache.http.client.protocol.HttpClientContext context)
public <T> java.util.concurrent.Future<T> execute(org.apache.http.nio.protocol.HttpAsyncRequestProducer requestProducer,
org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> responseConsumer,
org.apache.http.protocol.HttpContext context,
org.apache.http.concurrent.FutureCallback<T> callback)
HttpAsyncClientThe request producer passed to this method will be used to generate a request message and stream out its content without buffering it in memory. The response consumer passed to this method will be used to process a response message without buffering its content in memory.
Please note it may be unsafe to interact with the context instance while the request is still being executed.
T - the result type of request execution.requestProducer - request producer callback.responseConsumer - response consumer callaback.context - HTTP contextcallback - future callback.public <T> java.util.concurrent.Future<java.util.List<T>> execute(org.apache.http.HttpHost target,
java.util.List<? extends org.apache.http.nio.protocol.HttpAsyncRequestProducer> requestProducers,
java.util.List<? extends org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>> responseConsumers,
org.apache.http.protocol.HttpContext context,
org.apache.http.concurrent.FutureCallback<java.util.List<T>> callback)
HttpPipeliningClientThe request producers passed to this method will be used to generate a request message and stream out its content without buffering it in memory. The response consumers passed to this method will be used to process a response message without buffering its content in memory.
Please note it may be unsafe to interact with the context instance while the request is still being executed.
T - the result type of request execution.target - the target host for the request.requestProducers - list of request producers.responseConsumers - list of response consumers.context - HTTP contextcallback - future callback.