Package org.mapfish.print.http
Class AbstractMfClientHttpRequestFactoryWrapper
java.lang.Object
org.mapfish.print.http.AbstractMfClientHttpRequestFactoryWrapper
- All Implemented Interfaces:
MfClientHttpRequestFactory
,org.springframework.http.client.ClientHttpRequestFactory
public abstract class AbstractMfClientHttpRequestFactoryWrapper
extends Object
implements MfClientHttpRequestFactory
The AbstractMfClientHttpRequestFactoryWrapper class.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.mapfish.print.http.MfClientHttpRequestFactory
MfClientHttpRequestFactory.RequestConfigurator
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractMfClientHttpRequestFactoryWrapper
(MfClientHttpRequestFactory wrappedFactory, UriMatchers matchers, boolean failIfNotMatch) Creates aAbstractClientHttpRequestFactoryWrapper
wrapping the given request factory. -
Method Summary
Modifier and TypeMethodDescriptionfinal org.springframework.http.client.ClientHttpRequest
createRequest
(URI uri, org.springframework.http.HttpMethod httpMethod) This implementation simply callscreateRequest(URI, HttpMethod, MfClientHttpRequestFactory)
(if the matchers are OK) with the wrapped request factory provided to the constructor.protected abstract org.springframework.http.client.ClientHttpRequest
createRequest
(URI uri, org.springframework.http.HttpMethod httpMethod, MfClientHttpRequestFactory requestFactory) Create a newClientHttpRequest
for the specified URI and HTTP method by using the passed-on request factory.final void
Register a callback for config using a http request.
-
Constructor Details
-
AbstractMfClientHttpRequestFactoryWrapper
protected AbstractMfClientHttpRequestFactoryWrapper(MfClientHttpRequestFactory wrappedFactory, UriMatchers matchers, boolean failIfNotMatch) Creates aAbstractClientHttpRequestFactoryWrapper
wrapping the given request factory.- Parameters:
wrappedFactory
- the request factory to be wrapped.matchers
- the matchers used to enable/disable the rule.failIfNotMatch
- true if the processing must fail if the matchers are not OK.
-
-
Method Details
-
createRequest
public final org.springframework.http.client.ClientHttpRequest createRequest(URI uri, org.springframework.http.HttpMethod httpMethod) throws IOException This implementation simply callscreateRequest(URI, HttpMethod, MfClientHttpRequestFactory)
(if the matchers are OK) with the wrapped request factory provided to the constructor.- Specified by:
createRequest
in interfaceorg.springframework.http.client.ClientHttpRequestFactory
- Parameters:
uri
- the URI to create a request forhttpMethod
- the HTTP method to execute- Throws:
IOException
-
createRequest
protected abstract org.springframework.http.client.ClientHttpRequest createRequest(URI uri, org.springframework.http.HttpMethod httpMethod, MfClientHttpRequestFactory requestFactory) throws IOException Create a newClientHttpRequest
for the specified URI and HTTP method by using the passed-on request factory.Called from
createRequest(URI, HttpMethod)
.- Parameters:
uri
- the URI to create a request forhttpMethod
- the HTTP method to executerequestFactory
- the wrapped request factory- Returns:
- the created request
- Throws:
IOException
- in case of I/O errors
-
register
Description copied from interface:MfClientHttpRequestFactory
Register a callback for config using a http request.- Specified by:
register
in interfaceMfClientHttpRequestFactory
- Parameters:
callback
- the configuration callback
-