Class AbstractMfClientHttpRequestFactoryWrapper

  • All Implemented Interfaces:
    MfClientHttpRequestFactory, org.springframework.http.client.ClientHttpRequestFactory

    public abstract class AbstractMfClientHttpRequestFactoryWrapper
    extends java.lang.Object
    implements MfClientHttpRequestFactory
    The AbstractMfClientHttpRequestFactoryWrapper class.
    • Constructor Detail

      • 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 Detail

      • createRequest

        public final org.springframework.http.client.ClientHttpRequest createRequest​(java.net.URI uri,
                                                                                     org.springframework.http.HttpMethod httpMethod)
                                                                              throws java.io.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:
        java.io.IOException
      • createRequest

        protected abstract org.springframework.http.client.ClientHttpRequest createRequest​(java.net.URI uri,
                                                                                           org.springframework.http.HttpMethod httpMethod,
                                                                                           MfClientHttpRequestFactory requestFactory)
                                                                                    throws java.io.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:
        java.io.IOException - in case of I/O errors