@ThreadSafe public abstract class CloseableHttpPipeliningClient extends CloseableHttpAsyncClient implements HttpPipeliningClient
HttpPipeliningClient
that also
implements Closeable
.Constructor and Description |
---|
CloseableHttpPipeliningClient() |
Modifier and Type | Method and Description |
---|---|
<T> Future<List<T>> |
execute(HttpHost target,
List<? extends org.apache.http.nio.protocol.HttpAsyncRequestProducer> requestProducers,
List<? extends org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>> responseConsumers,
FutureCallback<List<T>> callback)
Initiates pipelined execution of a sequence of requests.
|
Future<List<HttpResponse>> |
execute(HttpHost target,
List<HttpRequest> requests,
FutureCallback<List<HttpResponse>> callback)
Initiates pipelined execution of a sequence of requests against
the given target.
|
Future<List<HttpResponse>> |
execute(HttpHost target,
List<HttpRequest> requests,
HttpContext context,
FutureCallback<List<HttpResponse>> callback)
Initiates pipelined execution of a sequence of requests against
the given target using the given context.
|
execute, execute, execute, execute, execute, isRunning, start
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
execute
public <T> Future<List<T>> execute(HttpHost target, List<? extends org.apache.http.nio.protocol.HttpAsyncRequestProducer> requestProducers, List<? extends org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>> responseConsumers, FutureCallback<List<T>> callback)
HttpPipeliningClient
The 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.
execute
in interface HttpPipeliningClient
T
- the result type of request execution.target
- the target host for the request.requestProducers
- list of request producers.responseConsumers
- list of response consumers.callback
- future callback.public Future<List<HttpResponse>> execute(HttpHost target, List<HttpRequest> requests, FutureCallback<List<HttpResponse>> callback)
HttpPipeliningClient
execute
in interface HttpPipeliningClient
target
- the target host for the requests.
Implementations may accept null
if they can still determine a route, for example
to a default target or by inspecting the request.requests
- the requests to executecallback
- future callback.public Future<List<HttpResponse>> execute(HttpHost target, List<HttpRequest> requests, HttpContext context, FutureCallback<List<HttpResponse>> callback)
HttpPipeliningClient
Please note it may be unsafe to interact with the context instance while the request is still being executed.
execute
in interface HttpPipeliningClient
target
- the target host for the requests.
Implementations may accept null
if they can still determine a route, for example
to a default target or by inspecting the request.requests
- the requests to executecontext
- the context to use for the execution, or
null
to use the default contextcallback
- future callback.Copyright © 2010–2015 The Apache Software Foundation. All rights reserved.