Class AbstractRouteManager<A,B,C extends AbstractRoute<A,B,C,D,E,F>,D extends AbstractRouteManager<A,B,C,D,E,F>,E extends AbstractRouter<A,B,C,D,E,F>,F extends AbstractRouteExtractor<A,B,C,D,E,F>>
- Type Parameters:
A
- the resource typeB
- the input typeC
- the route typeD
- the route manager typeE
- the router typeF
- the route extractor type
- All Implemented Interfaces:
RouteManager<A,
B, C, D, E>
Base RouteManager
implementation.
- Since:
- 1.12
- Author:
- Jeremy Kuhn
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal E
disable()
Disables all routes matching the criteria specified in the route manager and defined in the router it comes from.final E
enable()
Enables all routes matching the criteria specified in the route manager and defined in the router it comes from.Finds all routes matching the criteria specified in the route manager and defined in the router it comes from.final E
remove()
Removes all routes matching the criteria specified in the route manager and defined in the router it comes from.Returns the route extractor function.Returns the route matcher.Sets the routes in the router targeting resources provided by the specified factory, configure the resulting routes with the specified configurer and returns the router.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.inverno.mod.http.base.router.RouteManager
set, set
-
Constructor Details
-
AbstractRouteManager
Creates a route manager.
- Parameters:
router
- the router
-
-
Method Details
-
routeMatcher
Returns the route matcher.
The route matcher is used to determine whether a route is matching the criteria defined in the route manager.
- Returns:
- a route matcher
- See Also:
-
routeExtractor
Returns the route extractor function.
The route extractor is used to extract routes from the route manager when the resource is set. Relying on a
Function
allows to easily chain and combine extractor specific to a criteria.- Returns:
- a route extractor function
-
set
Description copied from interface:RouteManager
Sets the routes in the router targeting resources provided by the specified factory, configure the resulting routes with the specified configurer and returns the router.
Unlike
RouteManager.set(Object)
, each resulting routes target a different resource instance provided by the specified resource factory.The route configurer allows to post process the route before adding it to the server. This especially allows to set specific route information into the resource instance.
-
enable
Description copied from interface:RouteManager
Enables all routes matching the criteria specified in the route manager and defined in the router it comes from.
-
disable
Description copied from interface:RouteManager
Disables all routes matching the criteria specified in the route manager and defined in the router it comes from.
-
remove
Description copied from interface:RouteManager
Removes all routes matching the criteria specified in the route manager and defined in the router it comes from.
-
findRoutes
Description copied from interface:RouteManager
Finds all routes matching the criteria specified in the route manager and defined in the router it comes from.
-