final class HttpComponentsAsyncClientHttpRequest extends AbstractBufferingAsyncClientHttpRequest
ClientHttpRequest implementation that uses Apache HttpComponents HttpClient to
execute requests.
Created via the HttpComponentsClientHttpRequestFactory.
HttpComponentsClientHttpRequestFactory.createRequest(java.net.URI, org.springframework.http.HttpMethod)| Modifier and Type | Class and Description |
|---|---|
private static class |
HttpComponentsAsyncClientHttpRequest.ClientHttpResponseFuture |
private static class |
HttpComponentsAsyncClientHttpRequest.HttpResponseFutureCallback |
| Modifier and Type | Field and Description |
|---|---|
private HttpAsyncClient |
httpClient |
private HttpContext |
httpContext |
private HttpUriRequest |
httpRequest |
| Constructor and Description |
|---|
HttpComponentsAsyncClientHttpRequest(HttpAsyncClient httpClient,
HttpUriRequest httpRequest,
HttpContext httpContext) |
| Modifier and Type | Method and Description |
|---|---|
protected ListenableFuture<ClientHttpResponse> |
executeInternal(HttpHeaders headers,
byte[] bufferedOutput)
Abstract template method that writes the given headers and content to the HTTP request.
|
(package private) HttpContext |
getHttpContext() |
HttpMethod |
getMethod()
Return the HTTP method of the request.
|
java.net.URI |
getURI()
Return the URI of the request.
|
executeInternal, getBodyInternalassertNotExecuted, executeAsync, getBody, getHeadersprivate final HttpAsyncClient httpClient
private final HttpUriRequest httpRequest
private final HttpContext httpContext
HttpComponentsAsyncClientHttpRequest(HttpAsyncClient httpClient,
HttpUriRequest httpRequest,
HttpContext httpContext)
public HttpMethod getMethod()
HttpRequestnull
if not resolvable (e.g. in case of a non-standard HTTP method)public java.net.URI getURI()
HttpRequestnull)HttpContext getHttpContext()
protected ListenableFuture<ClientHttpResponse> executeInternal(HttpHeaders headers, byte[] bufferedOutput) throws java.io.IOException
AbstractBufferingAsyncClientHttpRequestexecuteInternal in class AbstractBufferingAsyncClientHttpRequestheaders - the HTTP headersbufferedOutput - the body contentjava.io.IOException