public class ScriptVerticle extends AbstractVerticle
vertxStop
method, this method will be invoked
when the verticle stops. Before the script starts the following objects are bound in the script binding:
vertx
: the Vertx
objectdeploymentID
: the deploymentID of this Verticleconfig
: the Verticle config as a Map<String, Object>
context, vertx
Constructor and Description |
---|
ScriptVerticle(groovy.lang.Script script) |
Modifier and Type | Method and Description |
---|---|
void |
start(Promise<Void> startPromise)
Start the verticle instance.
|
void |
stop(Promise<Void> stopPromise)
Stop the verticle instance.
|
config, deploymentID, getVertx, init, processArgs, start, stop
public void start(Promise<Void> startPromise) throws Exception
Vert.x calls this method when deploying the instance. You do not call it yourself.
A future 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.
start
in interface Verticle
start
in class AbstractVerticle
startPromise
- the futureException
public void stop(Promise<Void> stopPromise) throws Exception
Vert.x calls this method when un-deploying the instance. You do not call it yourself.
A future 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.
stop
in interface Verticle
stop
in class AbstractVerticle
stopPromise
- the futureException
Copyright © 2024 Eclipse. All rights reserved.