public interface Endpoint| Modifier and Type | Method and Description |
|---|---|
io.vertx.ext.web.Router | createRouter(io.vertx.core.Vertx vertx)Create a router that handles HTTP requests for this endpoint |
static void | fail(io.vertx.core.http.HttpServerResponse response, java.lang.Throwable throwable)Let the request fail by setting the correct HTTP error code and an error description in the body |
static java.lang.String | getEndpointPath(io.vertx.ext.web.RoutingContext context)Get absolute data store path from request |
java.lang.String | getMountPoint()Return the path prefix where the endpoint should be mounted |
static io.vertx.core.json.JsonObject | throwableToJsonResponse(java.lang.Throwable throwable)Generate the JSON error response for a failed request |
java.lang.String getMountPoint()
io.vertx.ext.web.Router createRouter(io.vertx.core.Vertx vertx)
vertx - the current Vert.x instancestatic java.lang.String getEndpointPath(io.vertx.ext.web.RoutingContext context)
context - the current routing contextstatic void fail(io.vertx.core.http.HttpServerResponse response,
java.lang.Throwable throwable)response - the response objectthrowable - the cause of the errorstatic io.vertx.core.json.JsonObject throwableToJsonResponse(java.lang.Throwable throwable)
throwable - the cause of the error