public Route GET(String uriPattern, RouteHandler routeHandler) { if (routeHandler instanceof ResourceHandler) { throw new PippoRuntimeException("Please use 'addResourceRoute()'"); } Route route = Route.GET(uriPattern, routeHandler); addRoute(route); return route; }
public Route addResourceRoute(ResourceHandler resourceHandler) { Route route = Route.GET(resourceHandler.getUriPattern(), resourceHandler); addRoute(route); return route; }
public Route ALL(String uriPattern, RouteHandler routeHandler) { Route route = Route.ALL(uriPattern, routeHandler); addRoute(route); return route; }
public Route PATCH(String uriPattern, RouteHandler routeHandler) { Route route = Route.PATCH(uriPattern, routeHandler); addRoute(route); return route; }
public Route DELETE(String uriPattern, RouteHandler routeHandler) { Route route = Route.DELETE(uriPattern, routeHandler); addRoute(route); return route; }