Package org.nanohttpd.router
Class RouterNanoHTTPD.UriRouter
java.lang.Object
org.nanohttpd.router.RouterNanoHTTPD.UriRouter
- Enclosing class:
- RouterNanoHTTPD
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd route.org.nanohttpd.protocols.http.response.Responseprocess(org.nanohttpd.protocols.http.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. 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 returnedvoidsetNotFoundHandler(Class<?> handler) voidsetNotImplemented(Class<?> handler) voidsetRoutePrioritizer(RouterNanoHTTPD.IRoutePrioritizer routePrioritizer)
-
Constructor Details
-
UriRouter
public UriRouter()
-
-
Method Details
-
process
public org.nanohttpd.protocols.http.response.Response process(org.nanohttpd.protocols.http.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. 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:
session- HTTP session- Returns:
- response
-
addRoute
Add route. Patched: autumo-beetroot.- Parameters:
url- URLpriority- priorityhandler- handlerinitParameter- initial parameters
-
setNotFoundHandler
-
setNotImplemented
-
setRoutePrioritizer
-