Package org.javalite.activeweb
Class AbstractRouteConfig
java.lang.Object
org.javalite.activeweb.AbstractRouteConfig
- All Implemented Interfaces:
InitConfig
- Author:
- Igor Polevoy: 12/30/11 7:22 PM
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
clear()
protected List<IgnoreSpec>
protected IgnoreSpec
Use to ignore requests.protected void
Use in configuration of custom routes in order to exclude any other routing paths, such as Standard and Restful.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.javalite.activeweb.InitConfig
completeInit, init
-
Constructor Details
-
AbstractRouteConfig
public AbstractRouteConfig()
-
-
Method Details
-
route
-
getRoutes
-
clear
protected void clear() -
ignore
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 theroute()
methods is irrelevant,- Parameters:
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.- Returns:
- instance of7 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 fromRouteConfig#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.
-