Class ExoRouter

  • All Implemented Interfaces:
    org.picocontainer.Startable

    public class ExoRouter
    extends Object
    implements org.picocontainer.Startable
    • Constructor Detail

      • ExoRouter

        public ExoRouter()
    • Method Detail

      • reset

        public static void reset()
      • addRoute

        public static void addRoute​(String path,
                                    String action)
        Add new route which loaded from route configuration file.
        Parameters:
        path - /{pageID}/ForumService
        action - the action which appends to patch after "ForumService" string.
      • addRoute

        public static void addRoute​(String path,
                                    String action,
                                    String params)
        Add new route which loaded from route configuration file.
        Parameters:
        path - /{pageID}/ForumService
        action - /{pageID}/ForumService
        params - the action which appends to patch after "ForumService" string ex: /{pageID}/{ForumService|}/{action} =>/{pageID}/ForumService/{}
      • appendRoute

        public static void appendRoute​(String path,
                                       String action,
                                       String params)
      • prependRoute

        public static void prependRoute​(String path,
                                        String action,
                                        String params)
        Add a new route at the beginning of the route list
      • prependRoute

        public static void prependRoute​(String path,
                                        String action)
        Add a new route at the beginning of the route list
      • reverse

        public static ExoRouter.ActionBuilder reverse​(String action,
                                                      Map<String,​Object> args)
        Generates ActionBuilder base on the action name and arguments list. Example: invokes reverse("show.topic", new HashMap<String, Object>{topicId, "topicId321"}) method.
        Parameters:
        action -
        args -
        Returns:
      • start

        public void start()
        Specified by:
        start in interface org.picocontainer.Startable
      • stop

        public void stop()
        Specified by:
        stop in interface org.picocontainer.Startable