Esempio n. 1
0
  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;
  }
Esempio n. 2
0
  public Route addResourceRoute(ResourceHandler resourceHandler) {
    Route route = Route.GET(resourceHandler.getUriPattern(), resourceHandler);
    addRoute(route);

    return route;
  }
Esempio n. 3
0
  public Route ALL(String uriPattern, RouteHandler routeHandler) {
    Route route = Route.ALL(uriPattern, routeHandler);
    addRoute(route);

    return route;
  }
Esempio n. 4
0
  public Route PATCH(String uriPattern, RouteHandler routeHandler) {
    Route route = Route.PATCH(uriPattern, routeHandler);
    addRoute(route);

    return route;
  }
Esempio n. 5
0
  public Route DELETE(String uriPattern, RouteHandler routeHandler) {
    Route route = Route.DELETE(uriPattern, routeHandler);
    addRoute(route);

    return route;
  }