Interface InterceptorManager<A extends ExchangeContext,B extends Exchange<A>,C extends Interceptable<A,B,C,D>,D extends InterceptorManager<A,B,C,D>>

Type Parameters:
A - the type of the exchange context
B - the type of exchange handled by the interceptor
C - the interceptable type
D - the interceptor manager type
All Known Subinterfaces:
ErrorInterceptorManager<A,B,C,D>, ErrorWebInterceptorManager<A,B>, WebInterceptorManager<A,B>

public interface InterceptorManager<A extends ExchangeContext,B extends Exchange<A>,C extends Interceptable<A,B,C,D>,D extends InterceptorManager<A,B,C,D>>

Base interceptor manager interface.

An interceptor manager is used to configure interceptors in a InterceptedRouter. It is created by a router and allows to define interceptors in an intercepting router.

A typical implementation should define methods to set criteria used by the router to match a route to an interceptor and an exchange interceptor that is eventually chained with the route exchange handler.

Since:
1.3
Author:
Jeremy Kuhn
  • Method Summary

    Modifier and Type
    Method
    Description
    interceptor(ExchangeInterceptor<? super A,B> interceptor)
    Specifies the exchange interceptor to apply to the resources matching the criteria defined in the interceptor manager.
    interceptors(List<ExchangeInterceptor<? super A,B>> interceptors)
    Specifies multiple exchange interceptors to apply to the resources matching the criteria defined in the interceptor manager.
  • Method Details

    • interceptor

      C interceptor(ExchangeInterceptor<? super A,B> interceptor)

      Specifies the exchange interceptor to apply to the resources matching the criteria defined in the interceptor manager.

      This method basically appends the interceptor and the associated route criteria to the intercepted router it comes from.

      Parameters:
      interceptor - the exchange interceptor
      Returns:
      the router
    • interceptors

      C interceptors(List<ExchangeInterceptor<? super A,B>> interceptors)

      Specifies multiple exchange interceptors to apply to the resources matching the criteria defined in the interceptor manager.

      This method basically appends the interceptors and the associated route criteria to the intercepted router it comes from.

      Parameters:
      interceptors - a list of exchange interceptors
      Returns:
      the router