public interface Container
An instance of this class will be created by the system and made available to a running Verticle.
It contains methods to programmatically deploy other verticles, undeploy verticles, deploy modules, get the configuration for a verticle and get the logger for a verticle, amongst other things.
| Modifier and Type | Method and Description |
|---|---|
JsonObject |
config()
Get the verticle configuration
|
void |
deployModule(java.lang.String moduleName)
Deploy a module programmatically
|
void |
deployModule(java.lang.String moduleName,
Handler<AsyncResult<java.lang.String>> doneHandler)
Deploy a module programmatically
|
void |
deployModule(java.lang.String moduleName,
int instances)
Deploy a module programmatically
|
void |
deployModule(java.lang.String moduleName,
int instances,
Handler<AsyncResult<java.lang.String>> doneHandler)
Deploy a module programmatically
|
void |
deployModule(java.lang.String moduleName,
JsonObject config)
Deploy a module programmatically
|
void |
deployModule(java.lang.String moduleName,
JsonObject config,
Handler<AsyncResult<java.lang.String>> doneHandler)
Deploy a module programmatically
|
void |
deployModule(java.lang.String moduleName,
JsonObject config,
int instances)
Deploy a module programmatically
|
void |
deployModule(java.lang.String moduleName,
JsonObject config,
int instances,
Handler<AsyncResult<java.lang.String>> doneHandler)
Deploy a module programmatically
|
void |
deployVerticle(java.lang.String main)
Deploy a worker verticle programmatically
|
void |
deployVerticle(java.lang.String main,
Handler<AsyncResult<java.lang.String>> doneHandler)
Deploy a verticle programmatically
|
void |
deployVerticle(java.lang.String main,
int instances)
Deploy a verticle programmatically
|
void |
deployVerticle(java.lang.String main,
int instances,
Handler<AsyncResult<java.lang.String>> doneHandler)
Deploy a verticle programmatically
|
void |
deployVerticle(java.lang.String main,
JsonObject config)
Deploy a verticle programmatically
|
void |
deployVerticle(java.lang.String main,
JsonObject config,
Handler<AsyncResult<java.lang.String>> doneHandler)
Deploy a verticle programmatically
|
void |
deployVerticle(java.lang.String main,
JsonObject config,
int instances)
Deploy a verticle programmatically
|
void |
deployVerticle(java.lang.String main,
JsonObject config,
int instances,
Handler<AsyncResult<java.lang.String>> doneHandler)
Deploy a verticle programmatically
|
void |
deployWorkerVerticle(java.lang.String main)
Deploy a worker verticle programmatically
|
void |
deployWorkerVerticle(java.lang.String main,
int instances)
Deploy a worker verticle programmatically
|
void |
deployWorkerVerticle(java.lang.String main,
JsonObject config)
Deploy a worker verticle programmatically
|
void |
deployWorkerVerticle(java.lang.String main,
JsonObject config,
int instances)
Deploy a worker verticle programmatically
|
void |
deployWorkerVerticle(java.lang.String main,
JsonObject config,
int instances,
boolean multiThreaded)
Deploy a worker verticle programmatically
|
void |
deployWorkerVerticle(java.lang.String main,
JsonObject config,
int instances,
boolean multiThreaded,
Handler<AsyncResult<java.lang.String>> doneHandler)
Deploy a worker verticle programmatically
|
java.util.Map<java.lang.String,java.lang.String> |
env()
Get an umodifiable map of system, environment variables.
|
void |
exit()
Cause the container to exit
|
Logger |
logger()
Get the verticle logger
|
void |
undeployModule(java.lang.String deploymentID)
Undeploy a module
|
void |
undeployModule(java.lang.String deploymentID,
Handler<AsyncResult<java.lang.Void>> doneHandler)
Undeploy a module
|
void |
undeployVerticle(java.lang.String deploymentID)
Undeploy a verticle
|
void |
undeployVerticle(java.lang.String deploymentID,
Handler<AsyncResult<java.lang.Void>> doneHandler)
Undeploy a module
|
void deployWorkerVerticle(java.lang.String main)
main - The main of the verticlevoid deployWorkerVerticle(java.lang.String main,
int instances)
main - The main of the verticleinstances - The number of instances to deploy (defaults to 1)void deployWorkerVerticle(java.lang.String main,
JsonObject config)
main - The main of the verticleconfig - JSON config to provide to the verticlevoid deployWorkerVerticle(java.lang.String main,
JsonObject config,
int instances)
main - The main of the verticleconfig - JSON config to provide to the verticleinstances - The number of instances to deploy (defaults to 1)void deployWorkerVerticle(java.lang.String main,
JsonObject config,
int instances,
boolean multiThreaded)
main - The main of the verticleconfig - JSON config to provide to the verticleinstances - The number of instances to deploy (defaults to 1)multiThreaded - if true then the verticle will be deployed as a multi-threaded workervoid deployWorkerVerticle(java.lang.String main,
JsonObject config,
int instances,
boolean multiThreaded,
Handler<AsyncResult<java.lang.String>> doneHandler)
main - The main of the verticleconfig - JSON config to provide to the verticleinstances - The number of instances to deploy (defaults to 1)doneHandler - The handler will be called passing in the unique deployment id when deployment is completevoid deployModule(java.lang.String moduleName)
moduleName - The main of the module to deployvoid deployModule(java.lang.String moduleName,
int instances)
moduleName - The main of the module to deployinstances - The number of instances to deploy (defaults to 1)void deployModule(java.lang.String moduleName,
JsonObject config)
moduleName - The main of the module to deployconfig - JSON config to provide to the modulevoid deployModule(java.lang.String moduleName,
JsonObject config,
int instances)
moduleName - The main of the module to deployconfig - JSON config to provide to the moduleinstances - The number of instances to deploy (defaults to 1)void deployModule(java.lang.String moduleName,
JsonObject config,
int instances,
Handler<AsyncResult<java.lang.String>> doneHandler)
moduleName - The main of the module to deployconfig - JSON config to provide to the moduleinstances - The number of instances to deploy (defaults to 1)doneHandler - The handler will be called passing in the unique deployment id when deployment is completevoid deployModule(java.lang.String moduleName,
Handler<AsyncResult<java.lang.String>> doneHandler)
moduleName - The main of the module to deploydoneHandler - The handler will be called passing in the unique deployment id when deployment is completevoid deployModule(java.lang.String moduleName,
JsonObject config,
Handler<AsyncResult<java.lang.String>> doneHandler)
moduleName - The main of the module to deployconfig - JSON config to provide to the moduledoneHandler - The handler will be called passing in the unique deployment id when deployment is completevoid deployModule(java.lang.String moduleName,
int instances,
Handler<AsyncResult<java.lang.String>> doneHandler)
moduleName - The main of the module to deploy
* @param instances The number of instances to deploy (defaults to 1)doneHandler - The handler will be called passing in the unique deployment id when deployment is completevoid deployVerticle(java.lang.String main)
main - The main of the verticlevoid deployVerticle(java.lang.String main,
int instances)
main - The main of the verticleinstances - The number of instances to deploy (defaults to 1)void deployVerticle(java.lang.String main,
JsonObject config)
main - The main of the verticleconfig - JSON config to provide to the verticlevoid deployVerticle(java.lang.String main,
JsonObject config,
int instances)
main - The main of the verticleconfig - JSON config to provide to the verticleinstances - The number of instances to deploy (defaults to 1)void deployVerticle(java.lang.String main,
JsonObject config,
int instances,
Handler<AsyncResult<java.lang.String>> doneHandler)
main - The main of the verticleconfig - JSON config to provide to the verticleinstances - The number of instances to deploy (defaults to 1)doneHandler - The handler will be called passing in the unique deployment id when deployment is completevoid deployVerticle(java.lang.String main,
Handler<AsyncResult<java.lang.String>> doneHandler)
main - The main of the verticledoneHandler - The handler will be called passing in the unique deployment id when deployment is completevoid deployVerticle(java.lang.String main,
JsonObject config,
Handler<AsyncResult<java.lang.String>> doneHandler)
main - The main of the verticleconfig - JSON config to provide to the verticledoneHandler - The handler will be called passing in the unique deployment id when deployment is completevoid deployVerticle(java.lang.String main,
int instances,
Handler<AsyncResult<java.lang.String>> doneHandler)
main - The main of the verticledoneHandler - The handler will be called passing in the unique deployment id when deployment is completevoid undeployVerticle(java.lang.String deploymentID)
deploymentID - The deployment IDvoid undeployVerticle(java.lang.String deploymentID,
Handler<AsyncResult<java.lang.Void>> doneHandler)
deploymentID - The deployment IDdoneHandler - The handler will be called when undeployment is completevoid undeployModule(java.lang.String deploymentID)
deploymentID - The deployment IDvoid undeployModule(java.lang.String deploymentID,
Handler<AsyncResult<java.lang.Void>> doneHandler)
deploymentID - The deployment IDdoneHandler - The handler will be called when undeployment is completeJsonObject config()
Logger logger()
void exit()
java.util.Map<java.lang.String,java.lang.String> env()