public interface Verticle
Use of verticles with Vert.x is entirely optional, but if you use them they provide an actor-like deployment and concurrency model, out of the box.
Vert.x does not provide a strict actor implementation, but there are significant similarities.
You can think of verticle instances as a bit like actors in the Actor Model. A typical verticle-based Vert.x application will be composed of many verticle instances in each Vert.x instance.
 The verticles communicate with each other by sending messages over the EventBus.
| Modifier and Type | Method and Description | 
|---|---|
Vertx | 
getVertx()
Get a reference to the Vert.x instance that deployed this verticle 
 | 
void | 
init(Vertx vertx,
    Context context)
Initialise the verticle with the Vert.x instance and the context. 
 | 
void | 
start(Future<Void> startFuture)
Deprecated. 
 
override instead  
start(Promise) | 
default void | 
start(Promise<Void> startPromise)
Start the verticle instance. 
 | 
void | 
stop(Future<Void> stopFuture)
Deprecated. 
 
override instead  
stop(Promise) | 
default void | 
stop(Promise<Void> stopPromise)
Stop the verticle instance. 
 | 
Vertx getVertx()
void init(Vertx vertx, Context context)
This method is called by Vert.x when the instance is deployed. You do not call it yourself.
vertx - the Vert.x instancecontext - the context@Deprecated void start(Future<Void> startFuture) throws Exception
start(Promise)Exceptiondefault void start(Promise<Void> startPromise) throws Exception
Vert.x calls this method when deploying the instance. You do not call it yourself.
 A promise is passed into the method, and when deployment is complete the verticle should either call
 Promise.complete(T) or Promise.fail(java.lang.Throwable) the future.
startPromise - the futureException@Deprecated void stop(Future<Void> stopFuture) throws Exception
stop(Promise)Exceptiondefault void stop(Promise<Void> stopPromise) throws Exception
Vert.x calls this method when un-deploying the instance. You do not call it yourself.
 A promise is passed into the method, and when un-deployment is complete the verticle should either call
 Promise.complete(T) or Promise.fail(java.lang.Throwable) the future.
stopPromise - the futureExceptionCopyright © 2020 Eclipse. All rights reserved.