Package rife.engine

Class Router

java.lang.Object
rife.engine.Router
Direct Known Subclasses:
Site

public class Router extends Object
Provides the routing features of the RIFE2 web engine.
Since:
1.0
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final void
    after(Class<? extends Element>... elementClasses)
    Adds class elements that will be processed in order after any routes in this router.
    final void
    after(Supplier<? extends Element>... elementSuppliers)
    Adds element suppliers that will be processed in order after any routes in this router.
    final void
    after(Element... elements)
    Adds lambda elements that will be processed in order after any routes in this router.
    final void
    before(Class<? extends Element>... elementClasses)
    Adds class elements that will be processed in order before any routes in this router.
    final void
    before(Supplier<? extends Element>... elementSuppliers)
    Adds element suppliers that will be processed in order before any routes in this router.
    final void
    before(Element... elements)
    Adds lambda elements that will be processed in order before any routes in this router.
    final Route
    delete(Class<? extends Element> elementClass)
    Registers a class element as a route for the DELETE method, the path will be derived from the uncapitalized shortened class name.
    final Route
    delete(String path, Class<? extends Element> elementClass)
    Registers a class element as a route for the DELETE method with a specific path.
    final Route
    delete(String path, Supplier<? extends Element> elementSupplier)
    Registers an element supplier as a route for the DELETE method with a specific path.
    final Route
    delete(String path, Element element)
    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
    delete(Supplier<? extends Element> elementSupplier)
    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
    exception(Class<? extends Element> elementClass)
    Registers a class element as the route for handling exceptions
    final Route
    exception(Supplier<? extends Element> elementSupplier)
    Registers an element supplier as the route for handling exceptions
    final Route
    exception(Element element)
    Registers a lambda element as the route for handling exceptions
    final Route
    fallback(Class<? extends Element> elementClass)
    Registers a class element as the route for handling requests that don't match any other routes.
    final Route
    fallback(Supplier<? extends Element> elementSupplier)
    Registers an element supplier as the route for handling requests that don't match any other routes.
    final Route
    fallback(Element element)
    Registers a lambda element as the route for handling requests that don't match any other routes.
    final Route
    get(Class<? extends Element> elementClass)
    Registers a class element as a route for the GET method, the path will be derived from the uncapitalized shortened class name.
    final Route
    get(String path, Class<? extends Element> elementClass)
    Registers a class element as a route for the GET method with a specific path.
    final Route
    get(String path, Supplier<? extends Element> elementSupplier)
    Registers an element supplier as a route for the GET method with a specific path.
    final Route
    get(String path, Element element)
    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
    get(Supplier<? extends Element> elementSupplier)
    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
    getPost(Class<? extends Element> elementClass)
    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
    getPost(String path, Class<? extends Element> elementClass)
    Registers a class element as a route for the GET and POST method with a specific path.
    final Route
    getPost(String path, Supplier<? extends Element> elementSupplier)
    Registers an element supplier as a route for the GET and POST method with a specific path.
    final Route
    getPost(String path, Element element)
    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
    getPost(Supplier<? extends Element> elementSupplier)
    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>
    T
    group(String path, T router)
    Adds another router as a group with a path to this router.
    final <T extends Router>
    T
    group(T router)
    Adds another router as a group to this router.
    final Route
    patch(Class<? extends Element> elementClass)
    Registers a class element as a route for the PATCH method, the path will be derived from the uncapitalized shortened class name.
    final Route
    patch(String path, Class<? extends Element> elementClass)
    Registers a class element as a route for the PATCH method with a specific path.
    final Route
    patch(String path, Supplier<? extends Element> elementSupplier)
    Registers an element supplier as a route for the PATCH method with a specific path.
    final Route
    patch(String path, Element element)
    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
    patch(Supplier<? extends Element> elementSupplier)
    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
    post(Class<? extends Element> elementClass)
    Registers a class element as a route for the POST method, the path will be derived from the uncapitalized shortened class name.
    final Route
    post(String path, Class<? extends Element> elementClass)
    Registers a class element as a route for the POST method with a specific path.
    final Route
    post(String path, Supplier<? extends Element> elementSupplier)
    Registers an element supplier as a route for the POST method with a specific path.
    final Route
    post(String path, Element element)
    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
    post(Supplier<? extends Element> elementSupplier)
    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
    put(Class<? extends Element> elementClass)
    Registers a class element as a route for the PUT method, the path will be derived from the uncapitalized shortened class name.
    final Route
    put(String path, Class<? extends Element> elementClass)
    Registers a class element as a route for the PUT method with a specific path.
    final Route
    put(String path, Supplier<? extends Element> elementSupplier)
    Registers an element supplier as a route for the PUT method with a specific path.
    final Route
    put(String path, Element element)
    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
    put(Supplier<? extends Element> elementSupplier)
    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
    route(Class<? extends Element> elementClass)
    Registers a class element as a route for any HTTP method, the path will be derived from the uncapitalized shortened class name.
    final Route
    route(String path, Class<? extends Element> elementClass)
    Registers a class element as a route for any HTTP method with a specific path.
    final Route
    route(String path, Supplier<? extends Element> elementSupplier)
    Registers an element supplier as a route for any HTTP method with a specific path.
    final Route
    route(String path, Element element)
    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
    route(Supplier<? extends Element> elementSupplier)
    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
    The setup() method will be called by RIFE2 when the web application starts up.
    Retrieves the top-level router, aka.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Router

      public Router()
  • Method Details

    • setup

      public void setup()
      The setup() method will be called by RIFE2 when the web application starts up. Lifecycle-wise it is equivalent to the constructor of the Router, 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

      @SafeVarargs public final void before(Class<? extends Element>... elementClasses)
      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

      @SafeVarargs public final void before(Supplier<? extends Element>... elementSuppliers)
      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

      public final void before(Element... elements)
      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

      @SafeVarargs public final void after(Class<? extends Element>... elementClasses)
      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

      @SafeVarargs public final void after(Supplier<? extends Element>... elementSuppliers)
      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

      public final void after(Element... elements)
      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

      public final <T extends Router> T group(T router)
      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

      public final <T extends Router> T group(String path, T router)
      Adds another router as a group with a path to this router.
      Parameters:
      path - the group's path
      router - the router to add
      Returns:
      the router that was added
      Since:
      1.0
    • get

      public final Route get(Class<? extends Element> elementClass)
      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

      public 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.
      Parameters:
      pathInfo - the pathinfo handling to use
      elementClass - the element to register a route for
      Since:
      1.0
    • get

      public final Route get(String path, Class<? extends Element> elementClass)
      Registers a class element as a route for the GET method with a specific path.
      Parameters:
      path - the path of the route
      elementClass - 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 route
      pathInfo - the pathinfo handling to use
      elementClass - the element to register a route for
      Since:
      1.0
    • get

      public final Route get(Supplier<? extends Element> elementSupplier)
      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

      public 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.
      Parameters:
      pathInfo - the pathinfo handling to use
      elementSupplier - the element to register a route for
      Since:
      1.1
    • get

      public final Route get(String path, Supplier<? extends Element> elementSupplier)
      Registers an element supplier as a route for the GET method with a specific path.
      Parameters:
      path - the path of the route
      elementSupplier - 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 route
      pathInfo - the pathinfo handling to use
      elementSupplier - the element to register a route for
      Since:
      1.1
    • get

      public final Route get(String path, Element element)
      Registers a lambda element as a route for the GET method with a specific path.
      Parameters:
      path - the path of the route
      element - the element to register a route for
      Since:
      1.0
    • get

      public 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.
      Parameters:
      path - the path of the route
      pathInfo - the pathinfo handling to use
      element - the element to register a route for
      Since:
      1.0
    • post

      public final Route post(Class<? extends Element> elementClass)
      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

      public 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.
      Parameters:
      pathInfo - the pathinfo handling to use
      elementClass - the element to register a route for
      Since:
      1.0
    • post

      public final Route post(String path, Class<? extends Element> elementClass)
      Registers a class element as a route for the POST method with a specific path.
      Parameters:
      path - the path of the route
      elementClass - 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 route
      pathInfo - the pathinfo handling to use
      elementClass - the element to register a route for
      Since:
      1.0
    • post

      public final Route post(Supplier<? extends Element> elementSupplier)
      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

      public 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.
      Parameters:
      pathInfo - the pathinfo handling to use
      elementSupplier - the element to register a route for
      Since:
      1.1
    • post

      public final Route post(String path, Supplier<? extends Element> elementSupplier)
      Registers an element supplier as a route for the POST method with a specific path.
      Parameters:
      path - the path of the route
      elementSupplier - 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 route
      pathInfo - the pathinfo handling to use
      elementSupplier - the element to register a route for
      Since:
      1.1
    • post

      public final Route post(String path, Element element)
      Registers a lambda element as a route for the POST method with a specific path.
      Parameters:
      path - the path of the route
      element - the element to register a route for
      Since:
      1.0
    • post

      public 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.
      Parameters:
      path - the path of the route
      pathInfo - the pathinfo handling to use
      element - the element to register a route for
      Since:
      1.0
    • getPost

      public final Route getPost(Class<? extends Element> elementClass)
      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

      public 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.
      Parameters:
      pathInfo - the pathinfo handling to use
      elementClass - the element to register a route for
      Since:
      1.0
    • getPost

      public final Route getPost(String path, Class<? extends Element> elementClass)
      Registers a class element as a route for the GET and POST method with a specific path.
      Parameters:
      path - the path of the route
      elementClass - 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 route
      pathInfo - the pathinfo handling to use
      elementClass - the element to register a route for
      Since:
      1.0
    • getPost

      public final Route getPost(Supplier<? extends Element> elementSupplier)
      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

      public 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.
      Parameters:
      pathInfo - the pathinfo handling to use
      elementSupplier - the element to register a route for
      Since:
      1.1
    • getPost

      public final Route getPost(String path, Supplier<? extends Element> elementSupplier)
      Registers an element supplier as a route for the GET and POST method with a specific path.
      Parameters:
      path - the path of the route
      elementSupplier - 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 route
      pathInfo - the pathinfo handling to use
      elementSupplier - the element to register a route for
      Since:
      1.1
    • getPost

      public final Route getPost(String path, Element element)
      Registers a lambda element as a route for the GET and POST method with a specific path.
      Parameters:
      path - the path of the route
      element - the element to register a route for
      Since:
      1.0
    • getPost

      public 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.
      Parameters:
      path - the path of the route
      pathInfo - the pathinfo handling to use
      element - the element to register a route for
      Since:
      1.0
    • put

      public final Route put(Class<? extends Element> elementClass)
      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

      public 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.
      Parameters:
      pathInfo - the pathinfo handling to use
      elementClass - the element to register a route for
      Since:
      1.0
    • put

      public final Route put(String path, Class<? extends Element> elementClass)
      Registers a class element as a route for the PUT method with a specific path.
      Parameters:
      path - the path of the route
      elementClass - 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 route
      pathInfo - the pathinfo handling to use
      elementClass - the element to register a route for
      Since:
      1.0
    • put

      public final Route put(Supplier<? extends Element> elementSupplier)
      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

      public 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.
      Parameters:
      pathInfo - the pathinfo handling to use
      elementSupplier - the element to register a route for
      Since:
      1.1
    • put

      public final Route put(String path, Supplier<? extends Element> elementSupplier)
      Registers an element supplier as a route for the PUT method with a specific path.
      Parameters:
      path - the path of the route
      elementSupplier - 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 route
      pathInfo - the pathinfo handling to use
      elementSupplier - the element to register a route for
      Since:
      1.1
    • put

      public final Route put(String path, Element element)
      Registers a lambda element as a route for the PUT method with a specific path.
      Parameters:
      path - the path of the route
      element - the element to register a route for
      Since:
      1.0
    • put

      public 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.
      Parameters:
      path - the path of the route
      pathInfo - the pathinfo handling to use
      element - the element to register a route for
      Since:
      1.0
    • delete

      public final Route delete(Class<? extends Element> elementClass)
      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

      public 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.
      Parameters:
      pathInfo - the pathinfo handling to use
      elementClass - the element to register a route for
      Since:
      1.0
    • delete

      public final Route delete(String path, Class<? extends Element> elementClass)
      Registers a class element as a route for the DELETE method with a specific path.
      Parameters:
      path - the path of the route
      elementClass - 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 route
      pathInfo - the pathinfo handling to use
      elementClass - the element to register a route for
      Since:
      1.0
    • delete

      public final Route delete(Supplier<? extends Element> elementSupplier)
      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

      public 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.
      Parameters:
      pathInfo - the pathinfo handling to use
      elementSupplier - the element to register a route for
      Since:
      1.1
    • delete

      public final Route delete(String path, Supplier<? extends Element> elementSupplier)
      Registers an element supplier as a route for the DELETE method with a specific path.
      Parameters:
      path - the path of the route
      elementSupplier - 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 route
      pathInfo - the pathinfo handling to use
      elementSupplier - the element to register a route for
      Since:
      1.1
    • delete

      public final Route delete(String path, Element element)
      Registers a lambda element as a route for the DELETE method with a specific path.
      Parameters:
      path - the path of the route
      element - the element to register a route for
      Since:
      1.0
    • delete

      public 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.
      Parameters:
      path - the path of the route
      pathInfo - the pathinfo handling to use
      element - the element to register a route for
      Since:
      1.0
    • patch

      public final Route patch(Class<? extends Element> elementClass)
      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

      public 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.
      Parameters:
      pathInfo - the pathinfo handling to use
      elementClass - the element to register a route for
      Since:
      1.0
    • patch

      public final Route patch(String path, Class<? extends Element> elementClass)
      Registers a class element as a route for the PATCH method with a specific path.
      Parameters:
      path - the path of the route
      elementClass - 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 route
      pathInfo - the pathinfo handling to use
      elementClass - the element to register a route for
      Since:
      1.0
    • patch

      public final Route patch(Supplier<? extends Element> elementSupplier)
      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

      public 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.
      Parameters:
      pathInfo - the pathinfo handling to use
      elementSupplier - the element to register a route for
      Since:
      1.1
    • patch

      public final Route patch(String path, Supplier<? extends Element> elementSupplier)
      Registers an element supplier as a route for the PATCH method with a specific path.
      Parameters:
      path - the path of the route
      elementSupplier - 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 route
      pathInfo - the pathinfo handling to use
      elementSupplier - the element to register a route for
      Since:
      1.1
    • patch

      public final Route patch(String path, Element element)
      Registers a lambda element as a route for the PATCH method with a specific path.
      Parameters:
      path - the path of the route
      element - the element to register a route for
      Since:
      1.0
    • patch

      public 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.
      Parameters:
      path - the path of the route
      pathInfo - the pathinfo handling to use
      element - the element to register a route for
      Since:
      1.0
    • route

      public final Route route(Class<? extends Element> elementClass)
      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

      public 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.
      Parameters:
      pathInfo - the pathinfo handling to use
      elementClass - the element to register a route for
      Since:
      1.0
    • route

      public final Route route(String path, Class<? extends Element> elementClass)
      Registers a class element as a route for any HTTP method with a specific path.
      Parameters:
      path - the path of the route
      elementClass - 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 route
      pathInfo - the pathinfo handling to use
      elementClass - the element to register a route for
      Since:
      1.0
    • route

      public final Route route(Supplier<? extends Element> elementSupplier)
      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

      public 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.
      Parameters:
      pathInfo - the pathinfo handling to use
      elementSupplier - the element to register a route for
      Since:
      1.0
    • route

      public final Route route(String path, Supplier<? extends Element> elementSupplier)
      Registers an element supplier as a route for any HTTP method with a specific path.
      Parameters:
      path - the path of the route
      elementSupplier - 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 route
      pathInfo - the pathinfo handling to use
      elementSupplier - the element to register a route for
      Since:
      1.0
    • route

      public final Route route(String path, Element element)
      Registers a lambda element as a route for any HTTP method with a specific path.
      Parameters:
      path - the path of the route
      element - the element to register a route for
      Since:
      1.0
    • route

      public 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.
      Parameters:
      path - the path of the route
      pathInfo - the pathinfo handling to use
      element - the element to register a route for
      Since:
      1.0
    • exception

      public final Route exception(Class<? extends Element> elementClass)
      Registers a class element as the route for handling exceptions
      Parameters:
      elementClass - the element to register a route for
      Since:
      1.0
    • exception

      public final Route exception(Supplier<? extends Element> elementSupplier)
      Registers an element supplier as the route for handling exceptions
      Parameters:
      elementSupplier - the element to register a route for
      Since:
      1.1
    • exception

      public final Route exception(Element element)
      Registers a lambda element as the route for handling exceptions
      Parameters:
      element - the element to register a route for
      Since:
      1.0
    • fallback

      public final Route fallback(Class<? extends Element> elementClass)
      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

      public final Route fallback(Supplier<? extends Element> elementSupplier)
      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

      public final Route fallback(Element element)
      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

      public HierarchicalProperties properties()
      Retrieves the hierarchical properties for this router.
      Returns:
      this router's collection of hierarchical properties
      Since:
      1.0
    • site

      public Site site()
      Retrieves the top-level router, aka. the site for this router.
      Returns:
      this router's site
      Since:
      1.0