public class FiberHttpClient extends CloseableHttpClient
Constructor and Description |
---|
FiberHttpClient(CloseableHttpAsyncClient client) |
FiberHttpClient(CloseableHttpAsyncClient client,
HttpRequestRetryHandler httpRequestRetryHandler) |
FiberHttpClient(CloseableHttpAsyncClient client,
HttpRequestRetryHandler httpRequestRetryHandler,
org.apache.http.nio.reactor.IOReactor ioreactor) |
FiberHttpClient(CloseableHttpAsyncClient client,
org.apache.http.nio.reactor.IOReactor ioreactor) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected CloseableHttpResponse |
doExecute(HttpHost target,
HttpRequest request,
HttpContext context) |
CloseableHttpResponse |
execute(HttpHost target,
HttpRequest request)
Executes HTTP request using the default context.
|
CloseableHttpResponse |
execute(HttpHost target,
HttpRequest request,
HttpContext context)
Executes HTTP request using the given context.
|
<T> T |
execute(HttpHost target,
HttpRequest request,
ResponseHandler<? extends T> responseHandler)
Executes a request using the default context and processes the
response using the given response handler.
|
<T> T |
execute(HttpHost target,
HttpRequest request,
ResponseHandler<? extends T> responseHandler,
HttpContext context)
Executes a request using the default context and processes the
response using the given response handler.
|
CloseableHttpResponse |
execute(HttpUriRequest request)
Executes HTTP request using the default context.
|
CloseableHttpResponse |
execute(HttpUriRequest request,
HttpContext context)
Executes HTTP request using the given context.
|
<T> T |
execute(HttpUriRequest request,
ResponseHandler<? extends T> responseHandler)
Executes a request using the default context and processes the
response using the given response handler.
|
<T> T |
execute(HttpUriRequest request,
ResponseHandler<? extends T> responseHandler,
HttpContext context)
Executes a request using the default context and processes the
response using the given response handler.
|
ClientConnectionManager |
getConnectionManager()
Obtains the connection manager used by this client.
|
HttpParams |
getParams()
Obtains the parameters for this client.
|
public FiberHttpClient(CloseableHttpAsyncClient client)
public FiberHttpClient(CloseableHttpAsyncClient client, org.apache.http.nio.reactor.IOReactor ioreactor)
public FiberHttpClient(CloseableHttpAsyncClient client, HttpRequestRetryHandler httpRequestRetryHandler)
public FiberHttpClient(CloseableHttpAsyncClient client, HttpRequestRetryHandler httpRequestRetryHandler, org.apache.http.nio.reactor.IOReactor ioreactor)
public HttpParams getParams()
org.apache.http.client.HttpClient
public ClientConnectionManager getConnectionManager()
org.apache.http.client.HttpClient
@Suspendable protected final CloseableHttpResponse doExecute(HttpHost target, HttpRequest request, HttpContext context) throws IOException, ClientProtocolException
doExecute
in class CloseableHttpClient
IOException
ClientProtocolException
public void close() throws IOException
IOException
@Suspendable public CloseableHttpResponse execute(HttpUriRequest request, HttpContext context) throws IOException, ClientProtocolException
Executes HTTP request using the given context.
execute
in interface HttpClient
execute
in class CloseableHttpClient
request
- the request to executecontext
- the context to use for the execution, or
null
to use the default contextIOException
- in case of a problem or the connection was abortedClientProtocolException
- in case of an http protocol error@Suspendable public <T> T execute(HttpUriRequest request, ResponseHandler<? extends T> responseHandler, HttpContext context) throws IOException, ClientProtocolException
Executes a request using the default context and processes the
response using the given response handler. The content entity associated
with the response is fully consumed and the underlying connection is
released back to the connection manager automatically in all cases
relieving individual ResponseHandler
s from having to manage
resource deallocation internally.
execute
in interface HttpClient
execute
in class CloseableHttpClient
request
- the request to executeresponseHandler
- the response handlercontext
- the context to use for the execution, or
null
to use the default contextIOException
- in case of a problem or the connection was abortedClientProtocolException
- in case of an http protocol error@Suspendable public CloseableHttpResponse execute(HttpHost target, HttpRequest request, HttpContext context) throws IOException, ClientProtocolException
Executes HTTP request using the given context.
execute
in interface HttpClient
execute
in class CloseableHttpClient
target
- the target host for the request.
Implementations may accept null
if they can still determine a route, for example
to a default target or by inspecting the request.request
- the request to executecontext
- the context to use for the execution, or
null
to use the default contextIOException
- in case of a problem or the connection was abortedClientProtocolException
- in case of an http protocol error@Suspendable public CloseableHttpResponse execute(HttpUriRequest request) throws IOException, ClientProtocolException
Executes HTTP request using the default context.
execute
in interface HttpClient
execute
in class CloseableHttpClient
request
- the request to executeIOException
- in case of a problem or the connection was abortedClientProtocolException
- in case of an http protocol error@Suspendable public CloseableHttpResponse execute(HttpHost target, HttpRequest request) throws IOException, ClientProtocolException
Executes HTTP request using the default context.
execute
in interface HttpClient
execute
in class CloseableHttpClient
target
- the target host for the request.
Implementations may accept null
if they can still determine a route, for example
to a default target or by inspecting the request.request
- the request to executeIOException
- in case of a problem or the connection was abortedClientProtocolException
- in case of an http protocol error@Suspendable public <T> T execute(HttpUriRequest request, ResponseHandler<? extends T> responseHandler) throws IOException, ClientProtocolException
Executes a request using the default context and processes the
response using the given response handler. The content entity associated
with the response is fully consumed and the underlying connection is
released back to the connection manager automatically in all cases
relieving individual ResponseHandler
s from having to manage
resource deallocation internally.
execute
in interface HttpClient
execute
in class CloseableHttpClient
request
- the request to executeresponseHandler
- the response handlerIOException
- in case of a problem or the connection was abortedClientProtocolException
- in case of an http protocol error@Suspendable public <T> T execute(HttpHost target, HttpRequest request, ResponseHandler<? extends T> responseHandler) throws IOException, ClientProtocolException
Executes a request using the default context and processes the
response using the given response handler. The content entity associated
with the response is fully consumed and the underlying connection is
released back to the connection manager automatically in all cases
relieving individual ResponseHandler
s from having to manage
resource deallocation internally.
execute
in interface HttpClient
execute
in class CloseableHttpClient
target
- the target host for the request.
Implementations may accept null
if they can still determine a route, for example
to a default target or by inspecting the request.request
- the request to executeresponseHandler
- the response handlerIOException
- in case of a problem or the connection was abortedClientProtocolException
- in case of an http protocol error@Suspendable public <T> T execute(HttpHost target, HttpRequest request, ResponseHandler<? extends T> responseHandler, HttpContext context) throws IOException, ClientProtocolException
Executes a request using the default context and processes the
response using the given response handler. The content entity associated
with the response is fully consumed and the underlying connection is
released back to the connection manager automatically in all cases
relieving individual ResponseHandler
s from having to manage
resource deallocation internally.
execute
in interface HttpClient
execute
in class CloseableHttpClient
target
- the target host for the request.
Implementations may accept null
if they can still determine a route, for example
to a default target or by inspecting the request.request
- the request to executeresponseHandler
- the response handlercontext
- the context to use for the execution, or
null
to use the default contextIOException
- in case of a problem or the connection was abortedClientProtocolException
- in case of an http protocol error