Constructor and Description |
---|
RouterImpl(com.google.inject.Injector injector) |
Modifier and Type | Method and Description |
---|---|
void |
compileRoutes()
Compile all the routes that have been registered with the router.
|
RouteBuilder |
DELETE() |
RouteBuilder |
GET() |
String |
getReverseRoute(Class<?> controllerClass,
String controllerMethodName)
Retrieves the reverse route for this controllerClass and method.
|
String |
getReverseRoute(Class<?> controllerClass,
String controllerMethodName,
Map<String,Object> parameterMap)
Retrieves the reverse route for this controllerClass and method.
|
Route |
getRouteFor(String httpMethod,
String uri)
Get the route for the given method and URI
|
RouteBuilder |
OPTIONS() |
RouteBuilder |
POST() |
RouteBuilder |
PUT() |
public Route getRouteFor(String httpMethod, String uri)
Router
getRouteFor
in interface Router
httpMethod
- The methoduri
- The URIpublic String getReverseRoute(Class<?> controllerClass, String controllerMethodName)
Router
Router.getReverseRoute(Class, String, Map)
in that casegetReverseRoute
in interface Router
controllerClass
- The controllerClass e.g. ApplicationController.classcontrollerMethodName
- the methodName of the class e.g. "index"public String getReverseRoute(Class<?> controllerClass, String controllerMethodName, Map<String,Object> parameterMap)
Router
getReverseRoute
in interface Router
controllerClass
- The controllerClass e.g. ApplicationController.classcontrollerMethodName
- the methodName of the class e.g. "index"public void compileRoutes()
Router
compileRoutes
in interface Router
public RouteBuilder GET()
public RouteBuilder POST()
public RouteBuilder PUT()
public RouteBuilder DELETE()
public RouteBuilder OPTIONS()
Copyright © 2013. All Rights Reserved.