Constructs a new path handler with initially no mappings, and a default notFoundHandler that simply sets a 404 status.
Adds a mapping to this handler, such that requests which match the given method and pattern will be handed off to the given handler.
Handles a request by looking for a mapped handler whose method and pattern match the request's, and letting that handler handle the request. If no match is found, the notFoundHandler will take care of it.
Sets the handler that will be called for requests that don't match any pre-configured mappings.
Handles an HTTP request. Note that this method may be called from multiple threads, as requests may be processed in parallel, so you should avoid performing actions which are not thread-safe.
A request handler that maps incoming requests to a particular handler based on the request's URL path and/or HTTP method (GET, POST, etc.).
Use the various overloaded versions of the addMapping(...) method to add handlers to this path handler. When handling requests, this path handler will look for matches deterministically in the order you add them. Therefore, adding mappings with conflicting or duplicate paths will cause the first one to always be called.
Path patterns should be defined according to the rules from the path-matcher library, found here: https://github.com/andrewlalis/path-matcher