Package fi.iki.elonen.router
Class RouterNanoHTTPD.UriRouter
java.lang.Object
fi.iki.elonen.router.RouterNanoHTTPD.UriRouter
- Enclosing class:
RouterNanoHTTPD
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
process
(NanoHTTPD.IHTTPSession session) Search in the mappings if the given url matches some of the rules If there are more than one marches returns the rule with less parameters e.g.private void
removeRoute
(String url) void
setNotFoundHandler
(Class<?> handler) void
setNotImplemented
(Class<?> handler) void
setRoutePrioritizer
(RouterNanoHTTPD.IRoutePrioritizer routePrioritizer)
-
Field Details
-
error404Url
-
routePrioritizer
-
-
Constructor Details
-
UriRouter
public UriRouter()
-
-
Method Details
-
process
Search in the mappings if the given url matches some of the rules If there are more than one marches returns the rule with less parameters e.g. mapping 1 = /user/:id mapping 2 = /user/help if the incoming uri is www.example.com/user/help - mapping 2 is returned if the incoming uri is www.example.com/user/3232 - mapping 1 is returned- Parameters:
url
-- Returns:
-
addRoute
-
removeRoute
-
setNotFoundHandler
-
setNotImplemented
-
setRoutePrioritizer
-