ninja
Class RouterImpl

java.lang.Object
  extended by ninja.RouterImpl
All Implemented Interfaces:
Router

public class RouterImpl
extends Object
implements Router


Constructor Summary
RouterImpl(com.google.inject.Injector injector)
           
 
Method Summary
 void compileRoutes()
          Compile all the routes that have been registered with the router.
 RouteBuilder DELETE()
           
 RouteBuilder GET()
           
 Route getRouteFor(String httpMethod, String uri)
          Get the route for the given method and URI
 RouteBuilder OPTIONS()
           
 RouteBuilder POST()
           
 RouteBuilder PUT()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RouterImpl

@Inject
public RouterImpl(com.google.inject.Injector injector)
Method Detail

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 method
uri - 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.