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.
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
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterConfigParsed(JsonObject
the read config, empty if none are provided. config)Implements io.
References Deprecated
JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.
Hook for sub-classes of |
| public void | afterStartingVertx(Vertx
the created Vert.x instance vertx)Implements io. Hook for sub-classes of |
| public void | afterStoppingVertx()
Implements io. Hook for sub classes of the |
| public void | beforeDeployingVerticle(DeploymentOptions
the current deployment options. Modify them to customize the deployment. deploymentOptions)Implements io. Hook for sub-classes of |
| public void | beforeStartingVertx(VertxOptions
the configured Vert.x options. Modify them to customize the Vert.x instance. options)Implements io. Hook for sub-classes of |
| public void | beforeStoppingVertx(Vertx
the vertx)Vertx instance, cannot be nullImplements io. Hook for sub classes of the |
| public static void | executeCommand(String
the command cmd, String... the arguments args)Utility method to execute a specific command. |
| public void | handleDeployFailed(Vertx
the vert.x instance vertx, String the verticle mainVerticle, DeploymentOptions the verticle deployment options deploymentOptions, Throwable the cause of the failure cause)Implements io. A deployment failure has been encountered. |
| public static void |
| Launcher | back to summary |
|---|---|
| public Launcher() | |
| afterConfigParsed | back to summary |
|---|---|
| public void afterConfigParsed(JsonObject config) Implements io. References Deprecated
See corresponding docs for further information. Hook for sub-classes of
| |
| afterStartingVertx | back to summary |
|---|---|
| public void afterStartingVertx(Vertx vertx) Implements io. Hook for sub-classes of
| |
| afterStoppingVertx | back to summary |
|---|---|
| public void afterStoppingVertx() Implements io. Doc from io. Hook for sub classes of the
| |
| beforeDeployingVerticle | back to summary |
|---|---|
| public void beforeDeployingVerticle(DeploymentOptions deploymentOptions) Implements io. Hook for sub-classes of
| |
| beforeStartingVertx | back to summary |
|---|---|
| public void beforeStartingVertx(VertxOptions options) Implements io. Hook for sub-classes of
| |
| beforeStoppingVertx | back to summary |
|---|---|
| public void beforeStoppingVertx(Vertx vertx) Implements io. Doc from io. Hook for sub classes of the | |
| executeCommand | back to summary |
|---|---|
| public static void executeCommand(String cmd, String... args) Utility method to execute a specific command. | |
| handleDeployFailed | back to summary |
|---|---|
| public void handleDeployFailed(Vertx vertx, String mainVerticle, DeploymentOptions deploymentOptions, Throwable cause) Implements io. A deployment failure has been encountered. You can override this method to customize the behavior. By default it closes the `vertx` instance.
| |
| main | back to summary |
|---|---|
| public static void main(String[] args) Main entry point.
| |