Class PathMatchingRouterBuilder
java.lang.Object
org.glassfish.jersey.server.internal.routing.PathMatchingRouterBuilder
- All Implemented Interfaces:
PathToRouterBuilder
/**
A request path pattern matching router hierarchy builder entry point.
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the list of the registered sub-routes.build()
(package private) static PathToRouterBuilder
newRoute
(PathPattern pattern) Create new request path pattern matching router builder.route
(PathPattern pattern) Complete the currently built unfinished sub-route (if any) and start building a new one.private void
startNewRoute
(PathPattern pattern) 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.
-
Field Details
-
acceptedRoutes
-
currentRouters
-
-
Constructor Details
-
PathMatchingRouterBuilder
private PathMatchingRouterBuilder()
-
-
Method Details
-
newRoute
Create new request path pattern matching router builder.- Parameters:
pattern
- request path matching pattern.- Returns:
- new request path pattern matching router builder.
-
startNewRoute
-
acceptedRoutes
Get the list of the registered sub-routes.- Returns:
- list of the registered sub-routes.
-
to
Description copied from interface:PathToRouterBuilder
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.- Specified by:
to
in interfacePathToRouterBuilder
- Parameters:
router
- new next-level router to be registered with the routed path pattern.- Returns:
- updated route builder ready to build a new
router
instance (or add more routes to the currently built one).
-
route
Complete the currently built unfinished sub-route (if any) and start building a new one. The completed sub-route is added to the list of the routes accepted by the router that is being built.- Parameters:
pattern
- routing pattern for the new sub-route.- Returns:
- updated router builder.
-
build
- Returns:
- hierarchical request path matching processor (i.e. router).
-