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
ConstructorsModifierConstructorDescriptionprotectedAbstractMfClientHttpRequestFactoryWrapper(MfClientHttpRequestFactory wrappedFactory, UriMatchers matchers, boolean failIfNotMatch) Creates aAbstractClientHttpRequestFactoryWrapperwrapping the given request factory. -
Method Summary
Modifier and TypeMethodDescriptionfinal org.springframework.http.client.ClientHttpRequestcreateRequest(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.ClientHttpRequestcreateRequest(URI uri, org.springframework.http.HttpMethod httpMethod, MfClientHttpRequestFactory requestFactory) Create a newClientHttpRequestfor the specified URI and HTTP method by using the passed-on request factory.final voidRegister a callback for config using a http request.
-
Constructor Details
-
AbstractMfClientHttpRequestFactoryWrapper
protected AbstractMfClientHttpRequestFactoryWrapper(MfClientHttpRequestFactory wrappedFactory, UriMatchers matchers, boolean failIfNotMatch) Creates aAbstractClientHttpRequestFactoryWrapperwrapping 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:
createRequestin 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 newClientHttpRequestfor 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:MfClientHttpRequestFactoryRegister a callback for config using a http request.- Specified by:
registerin interfaceMfClientHttpRequestFactory- Parameters:
callback- the configuration callback
-