open class Launcher : VertxCommandLauncher, VertxLifecycleHooks
A main() class that can be used to create Vert.x instance and deploy a verticle, or run a bare Vert.x instance. This class is used by the vertx command line utility to deploy verticles from the command line. It is extensible as "commands" can be added using the io.vertx.core.spi.launcher.CommandFactory SPI. E.g. vertx run myverticle.js vertx my-command ... It can also be used as the main class of an executable jar so you can run verticles directly with: java -jar myapp.jar
Author
Clement Escoffier
Launcher()
A |
open fun afterConfigParsed(config: JsonObject): Unit
Hook for sub-classes of Launcher after the config has been parsed. |
|
open fun afterStartingVertx(vertx: Vertx): Unit
Hook for sub-classes of Launcher after the vertx instance is started. |
|
open fun afterStoppingVertx(): Unit |
|
open fun beforeDeployingVerticle(deploymentOptions: DeploymentOptions): Unit
Hook for sub-classes of Launcher before the verticle is deployed. |
|
open fun beforeStartingVertx(options: VertxOptions): Unit
Hook for sub-classes of Launcher before the vertx instance is started. |
|
open fun beforeStoppingVertx(vertx: Vertx): Unit |
|
open static fun executeCommand(cmd: String, vararg args: String): Unit
Utility method to execute a specific command. |
|
open fun handleDeployFailed(vertx: Vertx, mainVerticle: String, deploymentOptions: DeploymentOptions, cause: Throwable): Unit
A deployment failure has been encountered. You can override this method to customize the behavior. By default it closes the `vertx` instance. |
|
open static fun main(args: Array<String>): Unit
Main entry point. |