Interface ErrorWebRouteInterceptor<A extends ExchangeContext>

Type Parameters:
A - the exchange context type
All Known Subinterfaces:
WebServer<A>, WebServer.Intercepted<A>

public interface ErrorWebRouteInterceptor<A extends ExchangeContext>

Entry point for configuring the error Web exchange interceptors to apply when creating error Web routes in an intercepted Web server.

It is implemented by the WebServer. Interceptors are defined using an ErrorWebRouteInterceptorManager which allows to specify the criteria an error Web route must match for the error Web exchange interceptor to be executed.

When defining an interceptor, the ErrorWebRouteInterceptorManager shall return a new intercepted Web server instance containing the interceptor definition. It can then be used to define more interceptors resulting in the creation of hierarchies of Web servers with different interceptor definitions.

Error Web routes that are expected to be intercepted must then be defined after defining interceptors on the resulting intercepted Web server.

Since:
1.12
Author:
Jeremy Kuhn
See Also:
  • Method Details

    • interceptError

      Returns a new interceptor manager for defining an error Web route interceptor.

      Returns:
      a new error Web route interceptor manager
    • interceptError

      Configures an error Web route interceptor.

      The result returned by the specified configurer function must be the error Web route interceptor returned by the input interceptor manager after defining the interceptor and which contains the configured interceptor. If that requirement is not met, invoking this method will most likely result in a no-op operation since no route could be defined on an error Web route interceptor containing the configured interceptor.

      Parameters:
      configurer - an error Web route interceptor configurer function
      Returns:
      the error Web route interceptor containing the configured interceptor
    • configureErrorInterceptors

      ErrorWebRouteInterceptor<A> configureErrorInterceptors(ErrorWebRouteInterceptor.Configurer<? super A> configurer)

      Configures multiple error Web route interceptors.

      Parameters:
      configurer - an error Web route interceptor configurer
      Returns:
      the error Web route interceptor containing the configured interceptors
    • configureErrorInterceptors

      ErrorWebRouteInterceptor<A> configureErrorInterceptors(List<ErrorWebRouteInterceptor.Configurer<? super A>> configurers)

      Configures multiple error Web route interceptors.

      Parameters:
      configurers - a list of error Web route interceptor configurers
      Returns:
      the error Web route interceptor containing the configured interceptors