vertx / io.vertx.lang.groovy / ScriptVerticle

ScriptVerticle

open class ScriptVerticle : AbstractVerticle

A Vert.x native verticle wrapping a Groovy script, the script will be executed when the Verticle starts. When the script defines a no arg accessible vertxStop method, this method will be invoked when the verticle stops. Before the script starts the following objects are bound in the script binding:

Author
Julien Viet

Constructors

<init>

ScriptVerticle(script: Script)

Functions

start

open fun start(startFuture: Future<Void>): Unit

Start the verticle instance.

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 io.vertx.core.Future#complete or io.vertx.core.Future#fail the future.

stop

open fun stop(stopFuture: Future<Void>): Unit

Stop the verticle instance.

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 io.vertx.core.Future#complete or io.vertx.core.Future#fail the future.