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 aAsyncClientHttpRequestFactorythat has support forAsyncClientHttpRequestInterceptors.- Since:
- 4.3
- Author:
- Jakub Narloch
- See Also:
InterceptingAsyncClientHttpRequest
Constructor Summary
Constructors Constructor Description InterceptingAsyncClientHttpRequestFactory(AsyncClientHttpRequestFactory delegate, List<AsyncClientHttpRequestInterceptor> interceptors)Create new instance ofInterceptingAsyncClientHttpRequestFactorywith delegated request factory and list of interceptors.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AsyncClientHttpRequestcreateAsyncRequest(URI uri, HttpMethod method)Create a new asynchronousAsyncClientHttpRequestfor the specified URI and HTTP method.
Constructor Detail
InterceptingAsyncClientHttpRequestFactory
public InterceptingAsyncClientHttpRequestFactory(AsyncClientHttpRequestFactory delegate, List<AsyncClientHttpRequestInterceptor> interceptors)
Create new instance ofInterceptingAsyncClientHttpRequestFactorywith 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:AsyncClientHttpRequestFactoryCreate a new asynchronousAsyncClientHttpRequestfor the specified URI and HTTP method.The returned request can be written to, and then executed by calling
AsyncClientHttpRequest.executeAsync().- Specified by:
createAsyncRequestin interfaceAsyncClientHttpRequestFactory- Parameters:
uri- the URI to create a request formethod- the HTTP method to execute- Returns:
- the created request