ninja
Class RouterImpl
java.lang.Object
ninja.RouterImpl
- All Implemented Interfaces:
- Router
public class RouterImpl
- extends Object
- implements Router
Constructor Summary |
RouterImpl(com.google.inject.Injector injector)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RouterImpl
@Inject
public RouterImpl(com.google.inject.Injector injector)
getRouteFor
public Route getRouteFor(String httpMethod,
String uri)
- Description copied from interface:
Router
- Get the route for the given method and URI
- Specified by:
getRouteFor
in interface Router
- Parameters:
httpMethod
- The methoduri
- The URI
- Returns:
- The route
compileRoutes
public void compileRoutes()
- Description copied from interface:
Router
- Compile all the routes that have been registered with the router. This should be called
once, during initialisation, before the application starts serving requests.
- Specified by:
compileRoutes
in interface Router
GET
public RouteBuilder GET()
- Specified by:
GET
in interface Router
POST
public RouteBuilder POST()
- Specified by:
POST
in interface Router
PUT
public RouteBuilder PUT()
- Specified by:
PUT
in interface Router
DELETE
public RouteBuilder DELETE()
- Specified by:
DELETE
in interface Router
OPTIONS
public RouteBuilder OPTIONS()
- Specified by:
OPTIONS
in interface Router
Copyright © 2012. All Rights Reserved.