Class ExoRouter.Route

  • Enclosing class:
    ExoRouter

    public static class ExoRouter.Route
    extends Object
    Route class which contains path, action and argument list.
    Author:
    thanhvc
    • Field Detail

      • action

        public String action
      • routesFile

        public String routesFile
      • routesFileLine

        public int routesFileLine
    • Constructor Detail

      • Route

        public Route()
    • Method Detail

      • compute

        public void compute()
      • addParams

        public void addParams​(String params)
      • matches

        public Map<String,​String> matches​(String path)
        Base on defined Pattern, when provided URI path, this method will extract all of parameters path value in given path which reflects in defined Pattern Example: defined Pattern = "/{pageID}/topic/{topicID}" invokes:: matches("1256/topic/topic544343"); result: Map<String, String> = {"pageID" -> "1256"}, {"topicID" -> "topic544343"}
        Parameters:
        path - : given URI path
        Returns: