Package rife.engine
Class Router
java.lang.Object
rife.engine.Router
- Direct Known Subclasses:
Site
Provides the routing features of the RIFE2 web engine.
- Since:
- 1.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
Adds class elements that will be processed in order after any routes in this router.final void
Adds element suppliers that will be processed in order after any routes in this router.final void
Adds lambda elements that will be processed in order after any routes in this router.final void
Adds class elements that will be processed in order before any routes in this router.final void
Adds element suppliers that will be processed in order before any routes in this router.final void
Adds lambda elements that will be processed in order before any routes in this router.final Route
Registers a class element as a route for the DELETE method, the path will be derived from the uncapitalized shortened class name.final Route
Registers a class element as a route for the DELETE method with a specific path.final Route
Registers an element supplier as a route for the DELETE method with a specific path.final Route
Registers a lambda element as a route for the DELETE method with a specific path.final Route
delete
(String path, PathInfoHandling pathInfo, Class<? extends Element> elementClass) Registers a class element as a route for the DELETE method with a specific path and pathinfo handling.final Route
delete
(String path, PathInfoHandling pathInfo, Supplier<? extends Element> elementSupplier) Registers an element supplier as a route for the DELETE method with a specific path and pathinfo handling.final Route
delete
(String path, PathInfoHandling pathInfo, Element element) Registers a lambda element as a route for the DELETE method with a specific path and pathinfo handling.final Route
Registers an element supplier as a route for the DELETE method, the path will be derived from the uncapitalized shortened class name.final Route
delete
(PathInfoHandling pathInfo, Class<? extends Element> elementClass) Registers a class element as a route for the DELETE method with a pathinfo handling, the path will be derived from the uncapitalized shortened class name.final Route
delete
(PathInfoHandling pathInfo, Supplier<? extends Element> elementSupplier) Registers an element supplier as a route for the DELETE method with a pathinfo handling, the path will be derived from the uncapitalized shortened class name.final Route
Registers a class element as the route for handling exceptionsfinal Route
Registers an element supplier as the route for handling exceptionsfinal Route
Registers a lambda element as the route for handling exceptionsfinal Route
Registers a class element as the route for handling requests that don't match any other routes.final Route
Registers an element supplier as the route for handling requests that don't match any other routes.final Route
Registers a lambda element as the route for handling requests that don't match any other routes.final Route
Registers a class element as a route for the GET method, the path will be derived from the uncapitalized shortened class name.final Route
Registers a class element as a route for the GET method with a specific path.final Route
Registers an element supplier as a route for the GET method with a specific path.final Route
Registers a lambda element as a route for the GET method with a specific path.final Route
get
(String path, PathInfoHandling pathInfo, Class<? extends Element> elementClass) Registers a class element as a route for the GET method with a specific path and pathinfo handling.final Route
get
(String path, PathInfoHandling pathInfo, Supplier<? extends Element> elementSupplier) Registers an element supplier as a route for the GET method with a specific path and pathinfo handling.final Route
get
(String path, PathInfoHandling pathInfo, Element element) Registers a lambda element as a route for the GET method with a specific path and pathinfo handling.final Route
Registers an element supplier as a route for the GET method, the path will be derived from the uncapitalized shortened class name.final Route
get
(PathInfoHandling pathInfo, Class<? extends Element> elementClass) Registers a class element as a route for the GET method with a pathinfo handling, the path will be derived from the uncapitalized shortened class name.final Route
get
(PathInfoHandling pathInfo, Supplier<? extends Element> elementSupplier) Registers an element supplier as a route for the GET method with a pathinfo handling, the path will be derived from the uncapitalized shortened class name.final Route
Registers a class element as a route for the GET and POST method, the path will be derived from the uncapitalized shortened class name.final Route
Registers a class element as a route for the GET and POST method with a specific path.final Route
Registers an element supplier as a route for the GET and POST method with a specific path.final Route
Registers a lambda element as a route for the GET and POST method with a specific path.final Route
getPost
(String path, PathInfoHandling pathInfo, Class<? extends Element> elementClass) Registers a class element as a route for the GET and POST method with a specific path and pathinfo handling.final Route
getPost
(String path, PathInfoHandling pathInfo, Supplier<? extends Element> elementSupplier) Registers an element supplier as a route for the GET and POST method with a specific path and pathinfo handling.final Route
getPost
(String path, PathInfoHandling pathInfo, Element element) Registers a lambda element as a route for the GET and POST method with a specific path and pathinfo handling.final Route
Registers an element supplier as a route for the GET and POST method, the path will be derived from the uncapitalized shortened class name.final Route
getPost
(PathInfoHandling pathInfo, Class<? extends Element> elementClass) Registers a class element as a route for the GET and POST method with a pathinfo handling, the path will be derived from the uncapitalized shortened class name.final Route
getPost
(PathInfoHandling pathInfo, Supplier<? extends Element> elementSupplier) Registers an element supplier as a route for the GET and POST method with a pathinfo handling, the path will be derived from the uncapitalized shortened class name.final <T extends Router>
TAdds another router as a group with a path to this router.final <T extends Router>
Tgroup
(T router) Adds another router as a group to this router.final Route
Registers a class element as a route for the PATCH method, the path will be derived from the uncapitalized shortened class name.final Route
Registers a class element as a route for the PATCH method with a specific path.final Route
Registers an element supplier as a route for the PATCH method with a specific path.final Route
Registers a lambda element as a route for the PATCH method with a specific path.final Route
patch
(String path, PathInfoHandling pathInfo, Class<? extends Element> elementClass) Registers a class element as a route for the PATCH method with a specific path and pathinfo handling.final Route
patch
(String path, PathInfoHandling pathInfo, Supplier<? extends Element> elementSupplier) Registers an element supplier as a route for the PATCH method with a specific path and pathinfo handling.final Route
patch
(String path, PathInfoHandling pathInfo, Element element) Registers a lambda element as a route for the PATCH method with a specific path and pathinfo handling.final Route
Registers an element supplier as a route for the PATCH method, the path will be derived from the uncapitalized shortened class name.final Route
patch
(PathInfoHandling pathInfo, Class<? extends Element> elementClass) Registers a class element as a route for the PATCH method with a pathinfo handling, the path will be derived from the uncapitalized shortened class name.final Route
patch
(PathInfoHandling pathInfo, Supplier<? extends Element> elementSupplier) Registers an element supplier as a route for the PATCH method with a pathinfo handling, the path will be derived from the uncapitalized shortened class name.final Route
Registers a class element as a route for the POST method, the path will be derived from the uncapitalized shortened class name.final Route
Registers a class element as a route for the POST method with a specific path.final Route
Registers an element supplier as a route for the POST method with a specific path.final Route
Registers a lambda element as a route for the POST method with a specific path.final Route
post
(String path, PathInfoHandling pathInfo, Class<? extends Element> elementClass) Registers a class element as a route for the POST method with a specific path and pathinfo handling.final Route
post
(String path, PathInfoHandling pathInfo, Supplier<? extends Element> elementSupplier) Registers an element supplier as a route for the POST method with a specific path and pathinfo handling.final Route
post
(String path, PathInfoHandling pathInfo, Element element) Registers a lambda element as a route for the POST method with a specific path and pathinfo handling.final Route
Registers an element supplier as a route for the POST method, the path will be derived from the uncapitalized shortened class name.final Route
post
(PathInfoHandling pathInfo, Class<? extends Element> elementClass) Registers a class element as a route for the POST method with a pathinfo handling, the path will be derived from the uncapitalized shortened class name.final Route
post
(PathInfoHandling pathInfo, Supplier<? extends Element> elementSupplier) Registers an element supplier as a route for the POST method with a pathinfo handling, the path will be derived from the uncapitalized shortened class name.Retrieves the hierarchical properties for this router.final Route
Registers a class element as a route for the PUT method, the path will be derived from the uncapitalized shortened class name.final Route
Registers a class element as a route for the PUT method with a specific path.final Route
Registers an element supplier as a route for the PUT method with a specific path.final Route
Registers a lambda element as a route for the PUT method with a specific path.final Route
put
(String path, PathInfoHandling pathInfo, Class<? extends Element> elementClass) Registers a class element as a route for the PUT method with a specific path and pathinfo handling.final Route
put
(String path, PathInfoHandling pathInfo, Supplier<? extends Element> elementSupplier) Registers an element supplier as a route for the PUT method with a specific path and pathinfo handling.final Route
put
(String path, PathInfoHandling pathInfo, Element element) Registers a lambda element as a route for the PUT method with a specific path and pathinfo handling.final Route
Registers an element supplier as a route for the PUT method, the path will be derived from the uncapitalized shortened class name.final Route
put
(PathInfoHandling pathInfo, Class<? extends Element> elementClass) Registers a class element as a route for the PUT method with a pathinfo handling, the path will be derived from the uncapitalized shortened class name.final Route
put
(PathInfoHandling pathInfo, Supplier<? extends Element> elementSupplier) Registers an element supplier as a route for the PUT method with a pathinfo handling, the path will be derived from the uncapitalized shortened class name.final Route
Registers a class element as a route for any HTTP method, the path will be derived from the uncapitalized shortened class name.final Route
Registers a class element as a route for any HTTP method with a specific path.final Route
Registers an element supplier as a route for any HTTP method with a specific path.final Route
Registers a lambda element as a route for any HTTP method with a specific path.final Route
route
(String path, PathInfoHandling pathInfo, Class<? extends Element> elementClass) Registers a class element as a route for any HTTP method with a specific path and pathinfo handling.final Route
route
(String path, PathInfoHandling pathInfo, Supplier<? extends Element> elementSupplier) Registers an element supplier as a route for any HTTP method with a specific path and pathinfo handling.final Route
route
(String path, PathInfoHandling pathInfo, Element element) Registers a lambda element as a route for any HTTP method with a specific path and pathinfo handling.final Route
Registers an element supplier as a route for any HTTP method, the path will be derived from the uncapitalized shortened class name.final Route
route
(PathInfoHandling pathInfo, Class<? extends Element> elementClass) Registers a class element as a route for any HTTP method with a pathinfo handling, the path will be derived from the uncapitalized shortened class name.final Route
route
(PathInfoHandling pathInfo, Supplier<? extends Element> elementSupplier) Registers an element supplier as a route for any HTTP method with a pathinfo handling, the path will be derived from the uncapitalized shortened class name.void
setup()
Thesetup()
method will be called by RIFE2 when the web application starts up.site()
Retrieves the top-level router, aka.
-
Constructor Details
-
Router
public Router()
-
-
Method Details
-
setup
public void setup()Thesetup()
method will be called by RIFE2 when the web application starts up. Lifecycle-wise it is equivalent to the constructor of theRouter
, but it can be used as an overloaded method in an anonymous inner class, which is very convenient when setting up groups.- Since:
- 1.0
-
before
Adds class elements that will be processed in order before any routes in this router.- Parameters:
elementClasses
- the element classes that should be processed before any routes.- Since:
- 1.0
-
before
Adds element suppliers that will be processed in order before any routes in this router.- Parameters:
elementSuppliers
- the element suppliers that should be processed before any routes.- Since:
- 1.1
-
before
Adds lambda elements that will be processed in order before any routes in this router.- Parameters:
elements
- the lambda elements that should be processed before any routes.- Since:
- 1.0
-
after
Adds class elements that will be processed in order after any routes in this router.- Parameters:
elementClasses
- the element classes that should be processed after any routes.- Since:
- 1.0
-
after
Adds element suppliers that will be processed in order after any routes in this router.- Parameters:
elementSuppliers
- the element suppliers that should be processed after any routes.- Since:
- 1.1
-
after
Adds lambda elements that will be processed in order after any routes in this router.- Parameters:
elements
- the lambda elements that should be processed after any routes.- Since:
- 1.0
-
group
Adds another router as a group to this router.- Parameters:
router
- the router to add- Returns:
- the router that was added
- Since:
- 1.0
-
group
Adds another router as a group with a path to this router.- Parameters:
path
- the group's pathrouter
- the router to add- Returns:
- the router that was added
- Since:
- 1.0
-
get
Registers a class element as a route for the GET method, the path will be derived from the uncapitalized shortened class name.- Parameters:
elementClass
- the element to register a route for- Since:
- 1.0
-
get
Registers a class element as a route for the GET method with a pathinfo handling, the path will be derived from the uncapitalized shortened class name.- Parameters:
pathInfo
- the pathinfo handling to useelementClass
- the element to register a route for- Since:
- 1.0
-
get
Registers a class element as a route for the GET method with a specific path.- Parameters:
path
- the path of the routeelementClass
- the element to register a route for- Since:
- 1.0
-
get
public final Route get(String path, PathInfoHandling pathInfo, Class<? extends Element> elementClass) Registers a class element as a route for the GET method with a specific path and pathinfo handling.- Parameters:
path
- the path of the routepathInfo
- the pathinfo handling to useelementClass
- the element to register a route for- Since:
- 1.0
-
get
Registers an element supplier as a route for the GET method, the path will be derived from the uncapitalized shortened class name.- Parameters:
elementSupplier
- the element to register a route for- Since:
- 1.1
-
get
Registers an element supplier as a route for the GET method with a pathinfo handling, the path will be derived from the uncapitalized shortened class name.- Parameters:
pathInfo
- the pathinfo handling to useelementSupplier
- the element to register a route for- Since:
- 1.1
-
get
Registers an element supplier as a route for the GET method with a specific path.- Parameters:
path
- the path of the routeelementSupplier
- the element to register a route for- Since:
- 1.1
-
get
public final Route get(String path, PathInfoHandling pathInfo, Supplier<? extends Element> elementSupplier) Registers an element supplier as a route for the GET method with a specific path and pathinfo handling.- Parameters:
path
- the path of the routepathInfo
- the pathinfo handling to useelementSupplier
- the element to register a route for- Since:
- 1.1
-
get
Registers a lambda element as a route for the GET method with a specific path.- Parameters:
path
- the path of the routeelement
- the element to register a route for- Since:
- 1.0
-
get
Registers a lambda element as a route for the GET method with a specific path and pathinfo handling.- Parameters:
path
- the path of the routepathInfo
- the pathinfo handling to useelement
- the element to register a route for- Since:
- 1.0
-
post
Registers a class element as a route for the POST method, the path will be derived from the uncapitalized shortened class name.- Parameters:
elementClass
- the element to register a route for- Since:
- 1.0
-
post
Registers a class element as a route for the POST method with a pathinfo handling, the path will be derived from the uncapitalized shortened class name.- Parameters:
pathInfo
- the pathinfo handling to useelementClass
- the element to register a route for- Since:
- 1.0
-
post
Registers a class element as a route for the POST method with a specific path.- Parameters:
path
- the path of the routeelementClass
- the element to register a route for- Since:
- 1.0
-
post
public final Route post(String path, PathInfoHandling pathInfo, Class<? extends Element> elementClass) Registers a class element as a route for the POST method with a specific path and pathinfo handling.- Parameters:
path
- the path of the routepathInfo
- the pathinfo handling to useelementClass
- the element to register a route for- Since:
- 1.0
-
post
Registers an element supplier as a route for the POST method, the path will be derived from the uncapitalized shortened class name.- Parameters:
elementSupplier
- the element to register a route for- Since:
- 1.1
-
post
Registers an element supplier as a route for the POST method with a pathinfo handling, the path will be derived from the uncapitalized shortened class name.- Parameters:
pathInfo
- the pathinfo handling to useelementSupplier
- the element to register a route for- Since:
- 1.1
-
post
Registers an element supplier as a route for the POST method with a specific path.- Parameters:
path
- the path of the routeelementSupplier
- the element to register a route for- Since:
- 1.1
-
post
public final Route post(String path, PathInfoHandling pathInfo, Supplier<? extends Element> elementSupplier) Registers an element supplier as a route for the POST method with a specific path and pathinfo handling.- Parameters:
path
- the path of the routepathInfo
- the pathinfo handling to useelementSupplier
- the element to register a route for- Since:
- 1.1
-
post
Registers a lambda element as a route for the POST method with a specific path.- Parameters:
path
- the path of the routeelement
- the element to register a route for- Since:
- 1.0
-
post
Registers a lambda element as a route for the POST method with a specific path and pathinfo handling.- Parameters:
path
- the path of the routepathInfo
- the pathinfo handling to useelement
- the element to register a route for- Since:
- 1.0
-
getPost
Registers a class element as a route for the GET and POST method, the path will be derived from the uncapitalized shortened class name.- Parameters:
elementClass
- the element to register a route for- Since:
- 1.0
-
getPost
Registers a class element as a route for the GET and POST method with a pathinfo handling, the path will be derived from the uncapitalized shortened class name.- Parameters:
pathInfo
- the pathinfo handling to useelementClass
- the element to register a route for- Since:
- 1.0
-
getPost
Registers a class element as a route for the GET and POST method with a specific path.- Parameters:
path
- the path of the routeelementClass
- the element to register a route for- Since:
- 1.0
-
getPost
public final Route getPost(String path, PathInfoHandling pathInfo, Class<? extends Element> elementClass) Registers a class element as a route for the GET and POST method with a specific path and pathinfo handling.- Parameters:
path
- the path of the routepathInfo
- the pathinfo handling to useelementClass
- the element to register a route for- Since:
- 1.0
-
getPost
Registers an element supplier as a route for the GET and POST method, the path will be derived from the uncapitalized shortened class name.- Parameters:
elementSupplier
- the element to register a route for- Since:
- 1.1
-
getPost
Registers an element supplier as a route for the GET and POST method with a pathinfo handling, the path will be derived from the uncapitalized shortened class name.- Parameters:
pathInfo
- the pathinfo handling to useelementSupplier
- the element to register a route for- Since:
- 1.1
-
getPost
Registers an element supplier as a route for the GET and POST method with a specific path.- Parameters:
path
- the path of the routeelementSupplier
- the element to register a route for- Since:
- 1.1
-
getPost
public final Route getPost(String path, PathInfoHandling pathInfo, Supplier<? extends Element> elementSupplier) Registers an element supplier as a route for the GET and POST method with a specific path and pathinfo handling.- Parameters:
path
- the path of the routepathInfo
- the pathinfo handling to useelementSupplier
- the element to register a route for- Since:
- 1.1
-
getPost
Registers a lambda element as a route for the GET and POST method with a specific path.- Parameters:
path
- the path of the routeelement
- the element to register a route for- Since:
- 1.0
-
getPost
Registers a lambda element as a route for the GET and POST method with a specific path and pathinfo handling.- Parameters:
path
- the path of the routepathInfo
- the pathinfo handling to useelement
- the element to register a route for- Since:
- 1.0
-
put
Registers a class element as a route for the PUT method, the path will be derived from the uncapitalized shortened class name.- Parameters:
elementClass
- the element to register a route for- Since:
- 1.0
-
put
Registers a class element as a route for the PUT method with a pathinfo handling, the path will be derived from the uncapitalized shortened class name.- Parameters:
pathInfo
- the pathinfo handling to useelementClass
- the element to register a route for- Since:
- 1.0
-
put
Registers a class element as a route for the PUT method with a specific path.- Parameters:
path
- the path of the routeelementClass
- the element to register a route for- Since:
- 1.0
-
put
public final Route put(String path, PathInfoHandling pathInfo, Class<? extends Element> elementClass) Registers a class element as a route for the PUT method with a specific path and pathinfo handling.- Parameters:
path
- the path of the routepathInfo
- the pathinfo handling to useelementClass
- the element to register a route for- Since:
- 1.0
-
put
Registers an element supplier as a route for the PUT method, the path will be derived from the uncapitalized shortened class name.- Parameters:
elementSupplier
- the element to register a route for- Since:
- 1.1
-
put
Registers an element supplier as a route for the PUT method with a pathinfo handling, the path will be derived from the uncapitalized shortened class name.- Parameters:
pathInfo
- the pathinfo handling to useelementSupplier
- the element to register a route for- Since:
- 1.1
-
put
Registers an element supplier as a route for the PUT method with a specific path.- Parameters:
path
- the path of the routeelementSupplier
- the element to register a route for- Since:
- 1.1
-
put
public final Route put(String path, PathInfoHandling pathInfo, Supplier<? extends Element> elementSupplier) Registers an element supplier as a route for the PUT method with a specific path and pathinfo handling.- Parameters:
path
- the path of the routepathInfo
- the pathinfo handling to useelementSupplier
- the element to register a route for- Since:
- 1.1
-
put
Registers a lambda element as a route for the PUT method with a specific path.- Parameters:
path
- the path of the routeelement
- the element to register a route for- Since:
- 1.0
-
put
Registers a lambda element as a route for the PUT method with a specific path and pathinfo handling.- Parameters:
path
- the path of the routepathInfo
- the pathinfo handling to useelement
- the element to register a route for- Since:
- 1.0
-
delete
Registers a class element as a route for the DELETE method, the path will be derived from the uncapitalized shortened class name.- Parameters:
elementClass
- the element to register a route for- Since:
- 1.0
-
delete
Registers a class element as a route for the DELETE method with a pathinfo handling, the path will be derived from the uncapitalized shortened class name.- Parameters:
pathInfo
- the pathinfo handling to useelementClass
- the element to register a route for- Since:
- 1.0
-
delete
Registers a class element as a route for the DELETE method with a specific path.- Parameters:
path
- the path of the routeelementClass
- the element to register a route for- Since:
- 1.0
-
delete
public final Route delete(String path, PathInfoHandling pathInfo, Class<? extends Element> elementClass) Registers a class element as a route for the DELETE method with a specific path and pathinfo handling.- Parameters:
path
- the path of the routepathInfo
- the pathinfo handling to useelementClass
- the element to register a route for- Since:
- 1.0
-
delete
Registers an element supplier as a route for the DELETE method, the path will be derived from the uncapitalized shortened class name.- Parameters:
elementSupplier
- the element to register a route for- Since:
- 1.1
-
delete
Registers an element supplier as a route for the DELETE method with a pathinfo handling, the path will be derived from the uncapitalized shortened class name.- Parameters:
pathInfo
- the pathinfo handling to useelementSupplier
- the element to register a route for- Since:
- 1.1
-
delete
Registers an element supplier as a route for the DELETE method with a specific path.- Parameters:
path
- the path of the routeelementSupplier
- the element to register a route for- Since:
- 1.1
-
delete
public final Route delete(String path, PathInfoHandling pathInfo, Supplier<? extends Element> elementSupplier) Registers an element supplier as a route for the DELETE method with a specific path and pathinfo handling.- Parameters:
path
- the path of the routepathInfo
- the pathinfo handling to useelementSupplier
- the element to register a route for- Since:
- 1.1
-
delete
Registers a lambda element as a route for the DELETE method with a specific path.- Parameters:
path
- the path of the routeelement
- the element to register a route for- Since:
- 1.0
-
delete
Registers a lambda element as a route for the DELETE method with a specific path and pathinfo handling.- Parameters:
path
- the path of the routepathInfo
- the pathinfo handling to useelement
- the element to register a route for- Since:
- 1.0
-
patch
Registers a class element as a route for the PATCH method, the path will be derived from the uncapitalized shortened class name.- Parameters:
elementClass
- the element to register a route for- Since:
- 1.0
-
patch
Registers a class element as a route for the PATCH method with a pathinfo handling, the path will be derived from the uncapitalized shortened class name.- Parameters:
pathInfo
- the pathinfo handling to useelementClass
- the element to register a route for- Since:
- 1.0
-
patch
Registers a class element as a route for the PATCH method with a specific path.- Parameters:
path
- the path of the routeelementClass
- the element to register a route for- Since:
- 1.0
-
patch
public final Route patch(String path, PathInfoHandling pathInfo, Class<? extends Element> elementClass) Registers a class element as a route for the PATCH method with a specific path and pathinfo handling.- Parameters:
path
- the path of the routepathInfo
- the pathinfo handling to useelementClass
- the element to register a route for- Since:
- 1.0
-
patch
Registers an element supplier as a route for the PATCH method, the path will be derived from the uncapitalized shortened class name.- Parameters:
elementSupplier
- the element to register a route for- Since:
- 1.1
-
patch
Registers an element supplier as a route for the PATCH method with a pathinfo handling, the path will be derived from the uncapitalized shortened class name.- Parameters:
pathInfo
- the pathinfo handling to useelementSupplier
- the element to register a route for- Since:
- 1.1
-
patch
Registers an element supplier as a route for the PATCH method with a specific path.- Parameters:
path
- the path of the routeelementSupplier
- the element to register a route for- Since:
- 1.1
-
patch
public final Route patch(String path, PathInfoHandling pathInfo, Supplier<? extends Element> elementSupplier) Registers an element supplier as a route for the PATCH method with a specific path and pathinfo handling.- Parameters:
path
- the path of the routepathInfo
- the pathinfo handling to useelementSupplier
- the element to register a route for- Since:
- 1.1
-
patch
Registers a lambda element as a route for the PATCH method with a specific path.- Parameters:
path
- the path of the routeelement
- the element to register a route for- Since:
- 1.0
-
patch
Registers a lambda element as a route for the PATCH method with a specific path and pathinfo handling.- Parameters:
path
- the path of the routepathInfo
- the pathinfo handling to useelement
- the element to register a route for- Since:
- 1.0
-
route
Registers a class element as a route for any HTTP method, the path will be derived from the uncapitalized shortened class name.- Parameters:
elementClass
- the element to register a route for- Since:
- 1.0
-
route
Registers a class element as a route for any HTTP method with a pathinfo handling, the path will be derived from the uncapitalized shortened class name.- Parameters:
pathInfo
- the pathinfo handling to useelementClass
- the element to register a route for- Since:
- 1.0
-
route
Registers a class element as a route for any HTTP method with a specific path.- Parameters:
path
- the path of the routeelementClass
- the element to register a route for- Since:
- 1.0
-
route
public final Route route(String path, PathInfoHandling pathInfo, Class<? extends Element> elementClass) Registers a class element as a route for any HTTP method with a specific path and pathinfo handling.- Parameters:
path
- the path of the routepathInfo
- the pathinfo handling to useelementClass
- the element to register a route for- Since:
- 1.0
-
route
Registers an element supplier as a route for any HTTP method, the path will be derived from the uncapitalized shortened class name.- Parameters:
elementSupplier
- the element to register a route for- Since:
- 1.0
-
route
Registers an element supplier as a route for any HTTP method with a pathinfo handling, the path will be derived from the uncapitalized shortened class name.- Parameters:
pathInfo
- the pathinfo handling to useelementSupplier
- the element to register a route for- Since:
- 1.0
-
route
Registers an element supplier as a route for any HTTP method with a specific path.- Parameters:
path
- the path of the routeelementSupplier
- the element to register a route for- Since:
- 1.0
-
route
public final Route route(String path, PathInfoHandling pathInfo, Supplier<? extends Element> elementSupplier) Registers an element supplier as a route for any HTTP method with a specific path and pathinfo handling.- Parameters:
path
- the path of the routepathInfo
- the pathinfo handling to useelementSupplier
- the element to register a route for- Since:
- 1.0
-
route
Registers a lambda element as a route for any HTTP method with a specific path.- Parameters:
path
- the path of the routeelement
- the element to register a route for- Since:
- 1.0
-
route
Registers a lambda element as a route for any HTTP method with a specific path and pathinfo handling.- Parameters:
path
- the path of the routepathInfo
- the pathinfo handling to useelement
- the element to register a route for- Since:
- 1.0
-
exception
Registers a class element as the route for handling exceptions- Parameters:
elementClass
- the element to register a route for- Since:
- 1.0
-
exception
Registers an element supplier as the route for handling exceptions- Parameters:
elementSupplier
- the element to register a route for- Since:
- 1.1
-
exception
Registers a lambda element as the route for handling exceptions- Parameters:
element
- the element to register a route for- Since:
- 1.0
-
fallback
Registers a class element as the route for handling requests that don't match any other routes.- Parameters:
elementClass
- the element to register a route for- Since:
- 1.0
-
fallback
Registers an element supplier as the route for handling requests that don't match any other routes.- Parameters:
elementSupplier
- the element to register a route for- Since:
- 1.1
-
fallback
Registers a lambda element as the route for handling requests that don't match any other routes.- Parameters:
element
- the element to register a route for- Since:
- 1.0
-
properties
Retrieves the hierarchical properties for this router.- Returns:
- this router's collection of hierarchical properties
- Since:
- 1.0
-
site
Retrieves the top-level router, aka. the site for this router.- Returns:
- this router's
site
- Since:
- 1.0
-