Interface ErrorWebRouter<A extends ExchangeContext>
- Type Parameters:
A
- the exchange context type
- All Superinterfaces:
BaseWebRouter
- All Known Subinterfaces:
WebServer<A>
,WebServer.Intercepted<A>
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:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
ErrorWebRouter.Configurer<A extends ExchangeContext>
A configurer used to configure error Web routes in a Web server. -
Method Summary
Modifier and TypeMethodDescriptionconfigureErrorRoutes
(ErrorWebRouter.Configurer<? super A> configurer) Configures multiple error Web routes and returns the originating error Web router.configureErrorRoutes
(List<ErrorWebRouter.Configurer<? super A>> configurers) Configures multiple error Web routes and returns the originating error Web router.Returns the error Web routes defined in the router.ErrorWebRouteManager
<A, ? extends ErrorWebRouter<A>> Returns a new route manager for defining an error Web route.default ErrorWebRouter
<A> routeError
(Consumer<ErrorWebRouteManager<A, ? extends ErrorWebRouter<A>>> configurer) Configures an error Web route and returns the originating error Web router.
-
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
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
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
-