ninja
Interface Router

All Known Implementing Classes:
RouterImpl

public interface Router


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()
           
 

Method Detail

getRouteFor

Route getRouteFor(String httpMethod,
                  String uri)
Get the route for the given method and URI

Parameters:
httpMethod - The method
uri - The URI
Returns:
The route

compileRoutes

void compileRoutes()
Compile all the routes that have been registered with the router. This should be called once, during initialisation, before the application starts serving requests.


GET

RouteBuilder GET()

POST

RouteBuilder POST()

PUT

RouteBuilder PUT()

DELETE

RouteBuilder DELETE()

OPTIONS

RouteBuilder OPTIONS()


Copyright © 2012. All Rights Reserved.