class InterceptingAsyncClientHttpRequest extends AbstractBufferingAsyncClientHttpRequest
AsyncClientHttpRequest wrapper that enriches it proceeds the actual
request execution with calling the registered interceptors.InterceptingAsyncClientHttpRequestFactory| Modifier and Type | Class and Description |
|---|---|
private class |
InterceptingAsyncClientHttpRequest.AsyncRequestExecution |
| Modifier and Type | Field and Description |
|---|---|
private HttpMethod |
httpMethod |
private java.util.List<AsyncClientHttpRequestInterceptor> |
interceptors |
private AsyncClientHttpRequestFactory |
requestFactory |
private java.net.URI |
uri |
| Constructor and Description |
|---|
InterceptingAsyncClientHttpRequest(AsyncClientHttpRequestFactory requestFactory,
java.util.List<AsyncClientHttpRequestInterceptor> interceptors,
java.net.URI uri,
HttpMethod httpMethod)
Creates new instance of
InterceptingAsyncClientHttpRequest. |
| Modifier and Type | Method and Description |
|---|---|
protected ListenableFuture<ClientHttpResponse> |
executeInternal(HttpHeaders headers,
byte[] body)
Abstract template method that writes the given headers and content to the HTTP request.
|
HttpMethod |
getMethod()
Return the HTTP method of the request.
|
java.net.URI |
getURI()
Return the URI of the request.
|
executeInternal, getBodyInternalassertNotExecuted, executeAsync, getBody, getHeadersprivate AsyncClientHttpRequestFactory requestFactory
private java.util.List<AsyncClientHttpRequestInterceptor> interceptors
private java.net.URI uri
private HttpMethod httpMethod
public InterceptingAsyncClientHttpRequest(AsyncClientHttpRequestFactory requestFactory, java.util.List<AsyncClientHttpRequestInterceptor> interceptors, java.net.URI uri, HttpMethod httpMethod)
InterceptingAsyncClientHttpRequest.requestFactory - the async request factoryinterceptors - the list of interceptorsuri - the request URIhttpMethod - the HTTP methodprotected ListenableFuture<ClientHttpResponse> executeInternal(HttpHeaders headers, byte[] body) throws java.io.IOException
AbstractBufferingAsyncClientHttpRequestexecuteInternal in class AbstractBufferingAsyncClientHttpRequestheaders - the HTTP headersbody - the body contentjava.io.IOExceptionpublic HttpMethod getMethod()
HttpRequestnull
if not resolvable (e.g. in case of a non-standard HTTP method)public java.net.URI getURI()
HttpRequestnull)