Interface ErrorWebRouter<A extends ExchangeContext>

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

public interface ErrorWebRouter<A extends ExchangeContext> extends BaseWebRouter

Entry point for configuring the error Web routes used to route error Web exchanges to a matching error Web exchange handlers.

It is implemented by the WebServer. Error handlers are defined using an ErrorWebRouteManager which allows to specify the criteria an error Web exchange must match to be processed by the error Web exchange handler defined in the route.

When defining a route, the error Web route interceptors defined in an intercepted Web server and matching the route's criteria are applied to the error Web exchange handler.

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

    • routeError

      ErrorWebRouteManager<A,? extends ErrorWebRouter<A>> routeError()

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

      Returns:
      a new error Web route manager
    • routeError

      default ErrorWebRouter<A> routeError(Consumer<ErrorWebRouteManager<A,? extends ErrorWebRouter<A>>> configurer)

      Configures an error Web route and returns the originating error Web router.

      Parameters:
      configurer - an error Web route configurer function
      Returns:
      the originating error Web router
    • configureErrorRoutes

      ErrorWebRouter<A> configureErrorRoutes(ErrorWebRouter.Configurer<? super A> configurer)

      Configures multiple error Web routes and returns the originating error Web router.

      Parameters:
      configurer - an error Web route configurer
      Returns:
      the originating error Web router
    • configureErrorRoutes

      ErrorWebRouter<A> configureErrorRoutes(List<ErrorWebRouter.Configurer<? super A>> configurers)

      Configures multiple error Web routes and returns the originating error Web router.

      Parameters:
      configurers - a list of error Web route configurers
      Returns:
      the originating error Web router
    • getErrorRoutes

      Set<ErrorWebRoute<A>> getErrorRoutes()

      Returns the error Web routes defined in the router.

      Returns:
      a set of error Web routes