Top Description Methods
io.vertx.core.impl.launcher

public Interface VertxLifecycleHooks

Known Direct Implementers
io.vertx.core.Launcher
Imports
io.vertx.core.DeploymentOptions, .Vertx, .VertxOptions, io.vertx.core.impl.VertxBuilder, io.vertx.core.json.JsonObject, io.vertx.core.spi.tracing.VertxTracer

Interface that let sub-classes of launcher to be notified on different events.
Author
Clement Escoffier

Method Summary

Modifier and TypeMethod and Description
public void
afterConfigParsed(JsonObject
the json config file passed via -conf on the command line, an empty json object is not set.
config
)
References Deprecated JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

Hook for sub-classes of the io.vertx.core.Launcher class before the vertx instance is started.

public void
afterStartingVertx(Vertx
the vert.x instance
vertx
)

Hook for sub-classes of the io.vertx.core.Launcher class after the vertx instance is started.

public void
afterStoppingVertx()

Hook for sub classes of the io.vertx.core.Launcher class called after the Vertx instance has been terminated.

public void
beforeDeployingVerticle(DeploymentOptions
the deployment options
deploymentOptions
)

Hook for sub classes of the io.vertx.core.Launcher class before the verticle is deployed.

public void
beforeStartingVertx(VertxOptions
the vert.x options
options
)

Hook for sub-classes of the io.vertx.core.Launcher class before the vertx instance is started.

public void
beforeStoppingVertx(Vertx
the Vertx instance, cannot be null
vertx
)

Hook for sub classes of the io.vertx.core.Launcher class called before the Vertx instance is terminated.

public default VertxBuilder

Returns:

the Vert.x builder instance
createVertxBuilder
(JsonObject
the Vert.x options to use, in JSON format
config
)
References Deprecated JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

Default implementation for the VertxBuilder creation.

public void
handleDeployFailed(Vertx
the vert.x instance
vertx
,
String
the main verticle name
mainVerticle
,
DeploymentOptions
the deployment options
deploymentOptions
,
Throwable
the cause
cause
)

A deployment failure has been encountered.

Method Detail

afterConfigParsedback to summary
public void afterConfigParsed(JsonObject config)

References Deprecated

JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Hook for sub-classes of the io.vertx.core.Launcher class before the vertx instance is started. Options can still be updated.

Parameters
config:JsonObject

the json config file passed via -conf on the command line, an empty json object is not set.

afterStartingVertxback to summary
public void afterStartingVertx(Vertx vertx)

Hook for sub-classes of the io.vertx.core.Launcher class after the vertx instance is started.

Parameters
vertx:Vertx

the vert.x instance

afterStoppingVertxback to summary
public void afterStoppingVertx()

Hook for sub classes of the io.vertx.core.Launcher class called after the Vertx instance has been terminated. The hook is called after the Vertx#close() method.

beforeDeployingVerticleback to summary
public void beforeDeployingVerticle(DeploymentOptions deploymentOptions)

Hook for sub classes of the io.vertx.core.Launcher class before the verticle is deployed. Deployment options can still be updated.

Parameters
deploymentOptions:DeploymentOptions

the deployment options

beforeStartingVertxback to summary
public void beforeStartingVertx(VertxOptions options)

Hook for sub-classes of the io.vertx.core.Launcher class before the vertx instance is started. Options can still be updated.

Parameters
options:VertxOptions

the vert.x options

beforeStoppingVertxback to summary
public void beforeStoppingVertx(Vertx vertx)

Hook for sub classes of the io.vertx.core.Launcher class called before the Vertx instance is terminated. The hook is called during the Vertx#close() method.

Parameters
vertx:Vertx

the Vertx instance, cannot be null

createVertxBuilderback to summary
public default VertxBuilder createVertxBuilder(JsonObject config)

References Deprecated

JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Default implementation for the VertxBuilder creation.

This can be overridden in order to customize, for example, the tracer, with VertxBuilder#tracer(VertxTracer).

Parameters
config:JsonObject

the Vert.x options to use, in JSON format

Returns:VertxBuilder

the Vert.x builder instance

handleDeployFailedback to summary
public void handleDeployFailed(Vertx vertx, String mainVerticle, DeploymentOptions deploymentOptions, Throwable cause)

A deployment failure has been encountered. You can override this method to customize the behavior.

Parameters
vertx:Vertx

the vert.x instance

mainVerticle:String

the main verticle name

deploymentOptions:DeploymentOptions

the deployment options

cause:Throwable

the cause