public abstract class ApplicationVerticle
extends io.vertx.core.AbstractVerticle
| Constructor and Description |
|---|
ApplicationVerticle() |
| Modifier and Type | Method and Description |
|---|---|
protected List<io.vertx.ext.bridge.PermittedOptions> |
addInboundSocketRules() |
protected List<io.vertx.ext.bridge.PermittedOptions> |
addOutboundSocketRules() |
protected boolean |
allowCORSCredentials() |
protected Set<String> |
allowedHeaders() |
protected Set<io.vertx.core.http.HttpMethod> |
allowedMethods() |
protected String |
apiPrefix() |
protected String |
appName() |
protected String |
bannerText() |
protected void |
beforeRouterCreate(io.vertx.ext.web.Router router)
Called immediately after Router creation.
|
protected io.vertx.core.Handler<io.vertx.ext.web.RoutingContext> |
createRouteFailureHandler() |
protected io.vertx.core.Handler<io.vertx.ext.web.RoutingContext> |
createRouteLogHandler() |
protected Set<String> |
exposedHeaders() |
protected abstract <R extends Resource> |
getResourceClasses() |
protected void |
onStart(io.vertx.core.http.HttpServer httpServer)
Called when the HttpServer has been started.
|
protected void |
onStartFail(Throwable error)
Called when the HttpServer failed to start
|
protected <T extends Service> |
registerService(Class<T>... services) |
protected <T extends Service> |
registerService(Class<T> service,
io.vertx.core.DeploymentOptions options) |
abstract void |
setup()
This is the very first method to be called when launching the main verticle.
|
protected void |
setupRoutes(io.vertx.ext.web.Router apiRouter)
Called before mounting API subrouter.
|
void |
start(io.vertx.core.Promise<Void> startPromise) |
protected String |
version() |
protected String |
webSocketPrefix() |
public void start(io.vertx.core.Promise<Void> startPromise)
start in interface io.vertx.core.Verticlestart in class io.vertx.core.AbstractVerticlepublic abstract void setup()
Service verticles should be registered using any of the registerService(Class[])
An Http server verticle is also automatically internally registered to Http requests.Serviceprotected <T extends Service> void registerService(Class<T> service, io.vertx.core.DeploymentOptions options)
protected void beforeRouterCreate(io.vertx.ext.web.Router router)
router - the root routerprotected void setupRoutes(io.vertx.ext.web.Router apiRouter)
apiRouter - api subrouterprotected void onStart(io.vertx.core.http.HttpServer httpServer)
httpServer - the started serverprotected void onStartFail(Throwable error)
error - cause of the failureprotected final String appName()
protected final String version()
protected boolean allowCORSCredentials()
protected Set<io.vertx.core.http.HttpMethod> allowedMethods()
protected String apiPrefix()
protected String webSocketPrefix()
protected String bannerText()
protected io.vertx.core.Handler<io.vertx.ext.web.RoutingContext> createRouteLogHandler()
protected io.vertx.core.Handler<io.vertx.ext.web.RoutingContext> createRouteFailureHandler()
protected List<io.vertx.ext.bridge.PermittedOptions> addInboundSocketRules()
protected List<io.vertx.ext.bridge.PermittedOptions> addOutboundSocketRules()
Copyright © 2021. All rights reserved.