final class PathMatchingRouterBuilder extends java.lang.Object implements PathToRouterBuilder
Modifier and Type | Field and Description |
---|---|
private java.util.List<Route> |
acceptedRoutes |
private java.util.List<Router> |
currentRouters |
Modifier | Constructor and Description |
---|---|
private |
PathMatchingRouterBuilder() |
Modifier and Type | Method and Description |
---|---|
protected java.util.List<Route> |
acceptedRoutes()
Get the list of the registered sub-routes.
|
PathMatchingRouter |
build()
|
(package private) static PathToRouterBuilder |
newRoute(PathPattern pattern)
Create new request path pattern matching router builder.
|
PathToRouterBuilder |
route(PathPattern pattern)
Complete the currently built unfinished sub-route (if any) and start building a new one.
|
private void |
startNewRoute(PathPattern pattern) |
PathMatchingRouterBuilder |
to(Router router)
Register a new next-level router to be used for request routing in case the routing pattern matches the
unmatched right-hand part of the request path.
|
private final java.util.List<Route> acceptedRoutes
private java.util.List<Router> currentRouters
static PathToRouterBuilder newRoute(PathPattern pattern)
pattern
- request path matching pattern.private void startNewRoute(PathPattern pattern)
protected java.util.List<Route> acceptedRoutes()
public PathMatchingRouterBuilder to(Router router)
PathToRouterBuilder
to
in interface PathToRouterBuilder
router
- new next-level router to be registered with the routed path pattern.router
instance
(or add more routes to the currently built one).public PathToRouterBuilder route(PathPattern pattern)
pattern
- routing pattern for the new sub-route.public PathMatchingRouter build()