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.
  • Constructor Details

    • AbstractMfClientHttpRequestFactoryWrapper

      protected AbstractMfClientHttpRequestFactoryWrapper(MfClientHttpRequestFactory wrappedFactory, UriMatchers matchers, boolean failIfNotMatch)
      Creates a AbstractClientHttpRequestFactoryWrapper 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 calls createRequest(URI, HttpMethod, MfClientHttpRequestFactory) (if the matchers are OK) with the wrapped request factory provided to the constructor.
      Specified by:
      createRequest in interface org.springframework.http.client.ClientHttpRequestFactory
      Parameters:
      uri - the URI to create a request for
      httpMethod - 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 new ClientHttpRequest 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 for
      httpMethod - the HTTP method to execute
      requestFactory - the wrapped request factory
      Returns:
      the created request
      Throws:
      IOException - in case of I/O errors
    • register

      public final void register(MfClientHttpRequestFactory.RequestConfigurator callback)
      Description copied from interface: MfClientHttpRequestFactory
      Register a callback for config using a http request.
      Specified by:
      register in interface MfClientHttpRequestFactory
      Parameters:
      callback - the configuration callback