/** * Map the route for HTTP PUT requests * * @param path the path * @param route The route * @param transformer the response transformer */ public void put(String path, Route route, ResponseTransformer transformer) { addRoute(HttpMethod.put, ResponseTransformerRouteImpl.create(path, route, transformer)); }
/** * Map the route for HTTP CONNECT requests * * @param path the path * @param route The route * @param transformer the response transformer */ public void connect(String path, Route route, ResponseTransformer transformer) { addRoute(HttpMethod.connect, ResponseTransformerRouteImpl.create(path, route, transformer)); }
/** * Map the route for HTTP GET requests * * @param path the path * @param route The route * @param transformer the response transformer */ public void get(String path, Route route, ResponseTransformer transformer) { addRoute(HttpMethod.get, ResponseTransformerRouteImpl.create(path, route, transformer)); }
/** * Map the route for HTTP POST requests * * @param path the path * @param route The route * @param transformer the response transformer */ public void post(String path, Route route, ResponseTransformer transformer) { addRoute(HttpMethod.post, ResponseTransformerRouteImpl.create(path, route, transformer)); }
/** * Map the route for HTTP POST requests * * @param path the path * @param acceptType the accept type * @param route The route * @param transformer the response transformer */ public void post(String path, String acceptType, Route route, ResponseTransformer transformer) { addRoute(HttpMethod.post, ResponseTransformerRouteImpl.create(path, acceptType, route, transformer)); }
/** * Map the route for HTTP DELETE requests * * @param path the path * @param route The route * @param transformer the response transformer */ public void delete(String path, Route route, ResponseTransformer transformer) { addRoute(HttpMethod.delete, ResponseTransformerRouteImpl.create(path, route, transformer)); }
/** * Map the route for HTTP PATCH requests * * @param path the path * @param route The route * @param transformer the response transformer */ public void patch(String path, Route route, ResponseTransformer transformer) { addRoute(HttpMethod.patch, ResponseTransformerRouteImpl.create(path, route, transformer)); }
/** * Map the route for HTTP HEAD requests * * @param path the path * @param route The route * @param transformer the response transformer */ public void head(String path, Route route, ResponseTransformer transformer) { addRoute(HttpMethod.head, ResponseTransformerRouteImpl.create(path, route, transformer)); }
/** * Map the route for HTTP HEAD requests * * @param path the path * @param acceptType the accept type * @param route The route * @param transformer the response transformer */ public void head(String path, String acceptType, Route route, ResponseTransformer transformer) { addRoute(HttpMethod.head, ResponseTransformerRouteImpl.create(path, acceptType, route, transformer)); }
/** * Map the route for HTTP OPTIONS requests * * @param path the path * @param route The route * @param transformer the response transformer */ public void options(String path, Route route, ResponseTransformer transformer) { addRoute(HttpMethod.options, ResponseTransformerRouteImpl.create(path, route, transformer)); }
/** * Map the route for HTTP GET requests * * @param path the path * @param acceptType the accept type * @param route The route * @param transformer the response transformer */ public void get(String path, String acceptType, Route route, ResponseTransformer transformer) { addRoute(HttpMethod.get, ResponseTransformerRouteImpl.create(path, acceptType, route, transformer)); }
/** * Map the route for HTTP PUT requests * * @param path the path * @param acceptType the accept type * @param route The route * @param transformer the response transformer */ public void put(String path, String acceptType, Route route, ResponseTransformer transformer) { addRoute(HttpMethod.put, ResponseTransformerRouteImpl.create(path, acceptType, route, transformer)); }
/** * Map the route for HTTP TRACE requests * * @param path the path * @param route The route * @param transformer the response transformer */ public void trace(String path, Route route, ResponseTransformer transformer) { addRoute(HttpMethod.trace, ResponseTransformerRouteImpl.create(path, route, transformer)); }
/** * Create route implementation or use default response transformer * * @param path the path * @param route the route * @return ResponseTransformerRouteImpl or RouteImpl */ private RouteImpl createRouteImpl(String path, Route route) { if (defaultResponseTransformer != null) { return ResponseTransformerRouteImpl.create(path, route, defaultResponseTransformer); } return RouteImpl.create(path, route); }
/** * Map the route for HTTP DELETE requests * * @param path the path * @param acceptType the accept type * @param route The route * @param transformer the response transformer */ public void delete(String path, String acceptType, Route route, ResponseTransformer transformer) { addRoute(HttpMethod.delete, ResponseTransformerRouteImpl.create(path, acceptType, route, transformer)); }
/** * Map the route for HTTP PATCH requests * * @param path the path * @param acceptType the accept type * @param route The route * @param transformer the response transformer */ public void patch(String path, String acceptType, Route route, ResponseTransformer transformer) { addRoute(HttpMethod.patch, ResponseTransformerRouteImpl.create(path, acceptType, route, transformer)); }
/** * Map the route for HTTP TRACE requests * * @param path the path * @param acceptType the accept type * @param route The route * @param transformer the response transformer */ public void trace(String path, String acceptType, Route route, ResponseTransformer transformer) { addRoute(HttpMethod.trace, ResponseTransformerRouteImpl.create(path, acceptType, route, transformer)); }
/** * Map the route for HTTP CONNECT requests * * @param path the path * @param acceptType the accept type * @param route The route * @param transformer the response transformer */ public void connect(String path, String acceptType, Route route, ResponseTransformer transformer) { addRoute(HttpMethod.connect, ResponseTransformerRouteImpl.create(path, acceptType, route, transformer)); }
/** * Map the route for HTTP OPTIONS requests * * @param path the path * @param acceptType the accept type * @param route The route * @param transformer the response transformer */ public void options(String path, String acceptType, Route route, ResponseTransformer transformer) { addRoute(HttpMethod.options, ResponseTransformerRouteImpl.create(path, acceptType, route, transformer)); }
/** * Create route implementation or use default response transformer * * @param path the path * @param acceptType the accept type * @param route the route * @return ResponseTransformerRouteImpl or RouteImpl */ private RouteImpl createRouteImpl(String path, String acceptType, Route route) { if (defaultResponseTransformer != null) { return ResponseTransformerRouteImpl.create(path, acceptType, route, defaultResponseTransformer); } return RouteImpl.create(path, acceptType, route); }