Class RouterNanoHTTPD.UriRouter

  • Enclosing class:
    RouterNanoHTTPD

    public static class RouterNanoHTTPD.UriRouter
    extends java.lang.Object
    • Constructor Detail

      • UriRouter

        public UriRouter()
    • Method Detail

      • process

        public NanoHTTPD.Response 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. 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

        private void addRoute​(java.lang.String url,
                              int priority,
                              java.lang.Class<?> handler,
                              java.lang.Object... initParameter)
      • removeRoute

        private void removeRoute​(java.lang.String url)
      • setNotFoundHandler

        public void setNotFoundHandler​(java.lang.Class<?> handler)
      • setNotImplemented

        public void setNotImplemented​(java.lang.Class<?> handler)