Package org.springframework.http.client
Class InterceptingAsyncClientHttpRequestFactory
- java.lang.Object
- org.springframework.http.client.InterceptingAsyncClientHttpRequestFactory
- All Implemented Interfaces:
AsyncClientHttpRequestFactory
public class InterceptingAsyncClientHttpRequestFactory extends Object implements AsyncClientHttpRequestFactory
Wrapper for aAsyncClientHttpRequestFactory
that has support forAsyncClientHttpRequestInterceptor
s.- Since:
- 4.3
- Author:
- Jakub Narloch
- See Also:
InterceptingAsyncClientHttpRequest
Constructor Summary
Constructors Constructor Description InterceptingAsyncClientHttpRequestFactory(AsyncClientHttpRequestFactory delegate, List<AsyncClientHttpRequestInterceptor> interceptors)
Create new instance ofInterceptingAsyncClientHttpRequestFactory
with delegated request factory and list of interceptors.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AsyncClientHttpRequest
createAsyncRequest(URI uri, HttpMethod method)
Create a new asynchronousAsyncClientHttpRequest
for the specified URI and HTTP method.
Constructor Detail
InterceptingAsyncClientHttpRequestFactory
public InterceptingAsyncClientHttpRequestFactory(AsyncClientHttpRequestFactory delegate, List<AsyncClientHttpRequestInterceptor> interceptors)
Create new instance ofInterceptingAsyncClientHttpRequestFactory
with delegated request factory and list of interceptors.- Parameters:
delegate
- the request factory to delegate tointerceptors
- the list of interceptors to use
Method Detail
createAsyncRequest
public AsyncClientHttpRequest createAsyncRequest(URI uri, HttpMethod method)
Description copied from interface:AsyncClientHttpRequestFactory
Create a new asynchronousAsyncClientHttpRequest
for the specified URI and HTTP method.The returned request can be written to, and then executed by calling
AsyncClientHttpRequest.executeAsync()
.- Specified by:
createAsyncRequest
in interfaceAsyncClientHttpRequestFactory
- Parameters:
uri
- the URI to create a request formethod
- the HTTP method to execute- Returns:
- the created request