final class HttpComponentsAsyncClientHttpRequest extends AbstractBufferingAsyncClientHttpRequest
ClientHttpRequest
implementation based on
Apache HttpComponents HttpAsyncClient.
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 client,
HttpUriRequest request,
HttpContext context) |
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, getBodyInternal
assertNotExecuted, executeAsync, getBody, getHeaders
private final HttpAsyncClient httpClient
private final HttpUriRequest httpRequest
private final HttpContext httpContext
HttpComponentsAsyncClientHttpRequest(HttpAsyncClient client, HttpUriRequest request, HttpContext context)
public HttpMethod getMethod()
HttpRequest
null
if not resolvable (e.g. in case of a non-standard HTTP method)public java.net.URI getURI()
HttpRequest
null
)HttpContext getHttpContext()
protected ListenableFuture<ClientHttpResponse> executeInternal(HttpHeaders headers, byte[] bufferedOutput) throws java.io.IOException
AbstractBufferingAsyncClientHttpRequest
executeInternal
in class AbstractBufferingAsyncClientHttpRequest
headers
- the HTTP headersbufferedOutput
- the body contentjava.io.IOException