Class AbstractRouteConfig

All Implemented Interfaces:

public abstract class AbstractRouteConfig extends Object implements InitConfig
Igor Polevoy: 12/30/11 7:22 PM
  • Constructor Details

    • AbstractRouteConfig

      public AbstractRouteConfig()
  • Method Details

    • route

      public RouteBuilder route(String route)
    • getRoutes

      public List<RouteBuilder> getRoutes()
    • clear

      protected void clear()
    • ignore

      protected IgnoreSpec ignore(String... ignores)
      Use to ignore requests. Usually you want to ignore requests for static content, such as css files, images. etc. The placement of this method compared to the route() methods is irrelevant,
      ignores - list of regular expressions matching the URI. If an expression matches the request URI, such request ill be ignored by the framework. It will be processed by container.
      instance of7 IgnoreSpec
    • getIgnoreSpecs

      protected final List<IgnoreSpec> getIgnoreSpecs()
    • strictMode

      protected void strictMode()
      Use in configuration of custom routes in order to exclude any other routing paths, such as Standard and Restful. Basically, if this method is called from RouteConfig#init() method, the routing system will ONLY allow routes configured in the RouteConfig#init() method and not any other routes.
      If this method is not called, all routes are enabled by default, standard, Restful as well as custom, which might not be a desired configuration, especially if you are building an API with more complexity than simple Restful routes.