Class FilterFactoryUtils


  • public final class FilterFactoryUtils
    extends java.lang.Object
    Utilities for filter factories.
    • Method Detail

      • appendClientFilterFactory

        public static StreamingHttpClientFilterFactory appendClientFilterFactory​(StreamingHttpClientFilterFactory first,
                                                                                 StreamingHttpClientFilterFactory second)
        Returns a composed function of two sequential client filter factories.

        The order of execution of these filters are in order of append. If 2 filters are appended as follows:

             StreamingHttpClientFilterFactory result = appendClientFilterFactory(filter1, filter2);
         
        making a request to a client wrapped by this filter chain the order of invocation of these filters will be:
             filter1 ⇒ filter2 ⇒ client
         
        Parameters:
        first - the factory for the first filter in execution chain
        second - the factory for the second filter in execution chain
        Returns:
        a composed function of two sequential filters
      • appendConnectionFilterFactory

        public static StreamingHttpConnectionFilterFactory appendConnectionFilterFactory​(StreamingHttpConnectionFilterFactory first,
                                                                                         StreamingHttpConnectionFilterFactory second)
        Returns a composed function of two sequential connection filter factories.

        The order of execution of these filters are in order of append. If 2 filters are appended as follows:

             StreamingHttpConnectionFilterFactory result = appendConnectionFilterFactory(filter1, filter2);
         
        making a request to a connection wrapped by this filter chain the order of invocation of these filters will be:
             filter1 ⇒ filter2 ⇒ connection
         
        Parameters:
        first - the factory for the first filter in execution chain
        second - the factory for the second filter in execution chain
        Returns:
        a composed function of two sequential filters
      • appendServiceFilterFactory

        public static StreamingHttpServiceFilterFactory appendServiceFilterFactory​(StreamingHttpServiceFilterFactory first,
                                                                                   StreamingHttpServiceFilterFactory second)
        Returns a composed function of two sequential service filter factories.

        The order of execution of these filters are in order of append. If 2 filters are appended as follows:

             StreamingHttpServiceFilterFactory result = appendServiceFilterFactory(filter1, filter2);
         
        accepting a request by a service wrapped by this filter chain, the order of invocation of these filters will be: be:
             filter1 ⇒ filter2 ⇒ service
         
        Parameters:
        first - the factory for the first filter in execution chain
        second - the factory for the second filter in execution chain
        Returns:
        a composed function of two sequential filters