Interface ResolverInterceptorFactory

  • All Known Implementing Classes:
    BatchLoaderAdapterFactory, DataFetcherResultAdapter, VoidToBooleanTypeAdapter

    public interface ResolverInterceptorFactory
    Interceptors wrap around resolver method invocation, output conversion and, finally, around each other. In this sense, they are similar to Servlet filters.

    An inner resolver is invoked around the resolver method, while an outer resolver is invoked around output conversion.

    Example 1. Given one inner and one outer interceptor, the order of invocations would be:

    1. outer: enter
    2. conversion: enter
    3. inner: enter
    4. <resolver method invoked>
    5. inner: exit
    6. conversion: exit
    7. outer: exit

    If multiple inner or outer resolvers are registered, they are wrapped around each other in the same order they are produced by the instances of this class.

    Example 2. Given two inner and two outer interceptor, the order of invocations would be:

    1. outer1: enter
    2. outer2: enter
    3. conversion: enter
    4. inner1: enter
    5. inner2: enter
    6. <resolver method invoked>
    7. inner2: exit
    8. inner1: exit
    9. conversion: exit
    10. outer2: exit
    11. outer1: exit