public class InterceptingClientHttpRequestFactory extends AbstractClientHttpRequestFactoryWrapper
ClientHttpRequestFactory
that has support for ClientHttpRequestInterceptor
s.Constructor and Description |
---|
InterceptingClientHttpRequestFactory(ClientHttpRequestFactory requestFactory,
java.util.List<ClientHttpRequestInterceptor> interceptors)
Creates a new instance of the
InterceptingClientHttpRequestFactory with the given parameters. |
Modifier and Type | Method and Description |
---|---|
protected ClientHttpRequest |
createRequest(java.net.URI uri,
HttpMethod httpMethod,
ClientHttpRequestFactory requestFactory)
Create a new
ClientHttpRequest for the specified URI and HTTP method by using the passed-on request
factory. |
createRequest
public InterceptingClientHttpRequestFactory(ClientHttpRequestFactory requestFactory, java.util.List<ClientHttpRequestInterceptor> interceptors)
InterceptingClientHttpRequestFactory
with the given parameters.requestFactory
- the request factory to wrapinterceptors
- the interceptors that are to be applied. Can be null
.protected ClientHttpRequest createRequest(java.net.URI uri, HttpMethod httpMethod, ClientHttpRequestFactory requestFactory)
AbstractClientHttpRequestFactoryWrapper
ClientHttpRequest
for the specified URI and HTTP method by using the passed-on request
factory.
Called from AbstractClientHttpRequestFactoryWrapper.createRequest(URI, HttpMethod)
.
createRequest
in class AbstractClientHttpRequestFactoryWrapper
uri
- the URI to create a request forhttpMethod
- the HTTP method to executerequestFactory
- the wrapped request factory