play.mvc
Class Router
java.lang.Object
play.mvc.Router
public class Router
- extends java.lang.Object
The router matches HTTP requests to action invocations
Method Summary |
static void |
addRoute(java.lang.String method,
java.lang.String path,
java.lang.String action)
This one can be called to add new route. |
protected static void |
appendRoute(java.lang.String method,
java.lang.String path,
java.lang.String action,
java.lang.String params)
This is used internally when reading the route file. |
static void |
detectChanges(java.lang.String prefix)
|
static java.lang.String |
getFullUrl(java.lang.String action)
|
static java.lang.String |
getFullUrl(java.lang.String action,
java.util.Map<java.lang.String,java.lang.Object> args)
|
static Router.Route |
getRoute(java.lang.String method,
java.lang.String path,
java.lang.String action,
java.lang.String params)
|
static void |
load(java.lang.String prefix)
|
static Router.ActionDefinition |
reverse(java.lang.String action)
|
static Router.ActionDefinition |
reverse(java.lang.String action,
java.util.Map<java.lang.String,java.lang.Object> args)
|
static java.lang.String |
reverse(VirtualFile file)
|
static void |
route(Http.Request request)
|
static java.util.Map<java.lang.String,java.lang.String> |
route(java.lang.String method,
java.lang.String path)
|
static void |
routeOnlyStatic(Http.Request request)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
lastLoading
public static long lastLoading
routes
public static java.util.List<Router.Route> routes
Router
public Router()
load
public static void load(java.lang.String prefix)
addRoute
public static void addRoute(java.lang.String method,
java.lang.String path,
java.lang.String action)
- This one can be called to add new route. Last added is first in the route list.
appendRoute
protected static void appendRoute(java.lang.String method,
java.lang.String path,
java.lang.String action,
java.lang.String params)
- This is used internally when reading the route file. The order the routes are added matters and
we want the to append the routes to the list.
getRoute
public static Router.Route getRoute(java.lang.String method,
java.lang.String path,
java.lang.String action,
java.lang.String params)
detectChanges
public static void detectChanges(java.lang.String prefix)
routeOnlyStatic
public static void routeOnlyStatic(Http.Request request)
route
public static void route(Http.Request request)
route
public static java.util.Map<java.lang.String,java.lang.String> route(java.lang.String method,
java.lang.String path)
reverse
public static Router.ActionDefinition reverse(java.lang.String action)
getFullUrl
public static java.lang.String getFullUrl(java.lang.String action,
java.util.Map<java.lang.String,java.lang.Object> args)
getFullUrl
public static java.lang.String getFullUrl(java.lang.String action)
reverse
public static java.lang.String reverse(VirtualFile file)
reverse
public static Router.ActionDefinition reverse(java.lang.String action,
java.util.Map<java.lang.String,java.lang.Object> args)
Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly