public abstract class Resource extends Object
| Constructor and Description |
|---|
Resource(io.vertx.ext.web.Router router) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
endContext(io.vertx.ext.web.RoutingContext ctx,
io.netty.handler.codec.http.HttpResponseStatus status) |
protected void |
endContext(io.vertx.ext.web.RoutingContext ctx,
io.netty.handler.codec.http.HttpResponseStatus status,
String message) |
protected void |
endContext(io.vertx.ext.web.RoutingContext ctx,
io.vertx.core.json.JsonArray body) |
protected void |
endContext(io.vertx.ext.web.RoutingContext ctx,
io.vertx.core.json.JsonObject body) |
protected void |
endContext(io.vertx.ext.web.RoutingContext ctx,
Object body) |
protected void |
failureHandler(io.vertx.ext.web.RoutingContext ctx,
Throwable cause) |
protected io.vertx.ext.web.Route |
get(String path) |
protected io.vertx.ext.web.Route |
get(String path,
UserRole role) |
protected org.slf4j.Logger |
logger() |
protected <T> io.vertx.core.Future<T> |
on(io.vertx.ext.web.RoutingContext ctx,
io.vertx.core.Future<T> action) |
protected <T> void |
on(io.vertx.ext.web.RoutingContext ctx,
io.vertx.core.Future<T> action,
io.vertx.core.Handler<T> onSuccess) |
protected io.vertx.ext.web.Route |
protectedRoute(io.vertx.core.http.HttpMethod method,
String path) |
protected io.vertx.ext.web.Route |
protectedRoute(io.vertx.core.http.HttpMethod method,
String path,
UserRole role) |
protected io.vertx.ext.web.Route |
put(String path) |
protected io.vertx.ext.web.Route |
put(String path,
UserRole role) |
protected io.vertx.ext.web.Route |
route(io.vertx.core.http.HttpMethod method,
String path) |
protected io.vertx.ext.web.Router |
router() |
protected abstract void |
routes()
Define routes and their route handlers.
|
protected void |
setUp()
Executed before routes declaration.
|
protected void setUp()
protected abstract void routes()
protected org.slf4j.Logger logger()
protected io.vertx.ext.web.Router router()
protected io.vertx.ext.web.Route route(io.vertx.core.http.HttpMethod method,
String path)
protected io.vertx.ext.web.Route protectedRoute(io.vertx.core.http.HttpMethod method,
String path)
protected io.vertx.ext.web.Route protectedRoute(io.vertx.core.http.HttpMethod method,
String path,
UserRole role)
protected io.vertx.ext.web.Route get(String path)
protected io.vertx.ext.web.Route put(String path)
protected void endContext(io.vertx.ext.web.RoutingContext ctx,
io.netty.handler.codec.http.HttpResponseStatus status,
String message)
protected void endContext(io.vertx.ext.web.RoutingContext ctx,
io.netty.handler.codec.http.HttpResponseStatus status)
protected void endContext(io.vertx.ext.web.RoutingContext ctx,
Object body)
protected void endContext(io.vertx.ext.web.RoutingContext ctx,
io.vertx.core.json.JsonObject body)
protected void endContext(io.vertx.ext.web.RoutingContext ctx,
io.vertx.core.json.JsonArray body)
protected <T> void on(io.vertx.ext.web.RoutingContext ctx,
io.vertx.core.Future<T> action,
io.vertx.core.Handler<T> onSuccess)
protected <T> io.vertx.core.Future<T> on(io.vertx.ext.web.RoutingContext ctx,
io.vertx.core.Future<T> action)
protected void failureHandler(io.vertx.ext.web.RoutingContext ctx,
Throwable cause)
Copyright © 2021. All rights reserved.