Module io.inverno.mod.http.base
Package io.inverno.mod.http.base.router
Class AbstractRouteExtractor<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>>
java.lang.Object
io.inverno.mod.http.base.router.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:
RouteExtractor<A,
C>
public abstract class AbstractRouteExtractor<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>>
extends Object
implements RouteExtractor<A,C>
Base RouteExtractor
implementation.
- Since:
- 1.12
- Author:
- Jeremy Kuhn
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractRouteExtractor
(E router) Creates a route extractor.protected
AbstractRouteExtractor
(F parent) Creates a route extractor. -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
Stored the specified route in the list of extracted routes.Returns the set of extracted routes.protected abstract void
populateRoute
(C route) Populates the route before storing it in the list of extracted routes.final void
Sets the resource extracted from the routing chain and stores the extracted routes.
-
Field Details
-
parent
-
-
Constructor Details
-
AbstractRouteExtractor
Creates a route extractor.
- Parameters:
router
- the router
-
AbstractRouteExtractor
Creates a route extractor.
- Parameters:
parent
- the parent route extractor
-
-
Method Details
-
addRoute
Stored the specified route in the list of extracted routes.
- Parameters:
route
- a route
-
populateRoute
Populates the route before storing it in the list of extracted routes.
This method is invoked when a resource is extracted in order to populate the route created by the router with the criteria extracted by the extractor.
- Parameters:
route
- a blank route
-
set
Description copied from interface:RouteExtractor
Sets the resource extracted from the routing chain and stores the extracted routes.
- Specified by:
set
in interfaceRouteExtractor<A,
B> - Parameters:
resource
- a resourcedisabled
- true if the corresponding route is disabled, false otherwise
-
getRoutes
Description copied from interface:RouteExtractor
Returns the set of extracted routes.
- Specified by:
getRoutes
in interfaceRouteExtractor<A,
B> - Returns:
- a set of routes
-