org.springframework.http.client
Class InterceptingClientHttpRequestFactory
java.lang.Object
org.springframework.http.client.AbstractClientHttpRequestFactoryWrapper
org.springframework.http.client.InterceptingClientHttpRequestFactory
- All Implemented Interfaces:
- ClientHttpRequestFactory
public class InterceptingClientHttpRequestFactory
- extends AbstractClientHttpRequestFactoryWrapper
Wrapper for a ClientHttpRequestFactory
that has support for ClientHttpRequestInterceptor
s.
- Since:
- 3.1
- Author:
- Arjen Poutsma
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InterceptingClientHttpRequestFactory
public InterceptingClientHttpRequestFactory(ClientHttpRequestFactory requestFactory,
List<ClientHttpRequestInterceptor> interceptors)
- Creates a new instance of the
InterceptingClientHttpRequestFactory
with the given parameters.
- Parameters:
requestFactory
- the request factory to wrapinterceptors
- the interceptors that are to be applied. Can be null
.
createRequest
protected ClientHttpRequest createRequest(URI uri,
HttpMethod httpMethod,
ClientHttpRequestFactory requestFactory)
- Description copied from class:
AbstractClientHttpRequestFactoryWrapper
- Create a new
ClientHttpRequest
for the specified URI and HTTP method by using the
passed-on request factory.
Called from AbstractClientHttpRequestFactoryWrapper.createRequest(URI, HttpMethod)
.
- Specified by:
createRequest
in class AbstractClientHttpRequestFactoryWrapper
- Parameters:
uri
- the URI to create a request forhttpMethod
- the HTTP method to executerequestFactory
- the wrapped request factory
- Returns:
- the created request