public class AbstractVerticle extends AbstractVerticle
Modifier and Type | Field and Description |
---|---|
protected Vertx |
vertx |
context
Constructor and Description |
---|
AbstractVerticle() |
Modifier and Type | Method and Description |
---|---|
void |
init(Vertx vertx,
Context context)
Initialise the verticle.
|
Completable |
rxStart()
Override to return a
Completable that will complete the deployment of this verticle. |
Completable |
rxStop()
Override to return a
Completable that will complete the undeployment of this verticle. |
void |
start(Promise<Void> startFuture)
Start the verticle.
|
void |
stop(Promise<Void> stopFuture)
Stop the verticle.
|
config, deploymentID, getVertx, processArgs, start, stop
protected Vertx vertx
public void init(Vertx vertx, Context context)
AbstractVerticle
This is called by Vert.x when the verticle instance is deployed. Don't call it yourself.
init
in interface Verticle
init
in class AbstractVerticle
vertx
- the deploying Vert.x instancecontext
- the context of the verticlepublic void start(Promise<Void> startFuture) throws Exception
AbstractVerticle
This is called by Vert.x when the verticle instance is deployed. Don't call it yourself.
If your verticle does things in its startup which take some time then you can override this method and call the startFuture some time later when start up is complete.
start
in interface Verticle
start
in class AbstractVerticle
startFuture
- a promise which should be called when verticle start-up is complete.Exception
public Completable rxStart()
Completable
that will complete the deployment of this verticle.
When null
is returned, the AbstractVerticle.start()
will be called instead.public void stop(Promise<Void> stopFuture) throws Exception
AbstractVerticle
This is called by Vert.x when the verticle instance is un-deployed. Don't call it yourself.
If your verticle does things in its shut-down which take some time then you can override this method and call the stopFuture some time later when clean-up is complete.
stop
in interface Verticle
stop
in class AbstractVerticle
stopFuture
- a promise which should be called when verticle clean-up is complete.Exception
public Completable rxStop()
Completable
that will complete the undeployment of this verticle.
When null
is returned, the AbstractVerticle.stop()
will be called instead.Copyright © 2024 Eclipse. All rights reserved.