public class Container
extends java.lang.Object
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.
| Constructor and Description |
|---|
Container(VerticleManager mgr) |
| Modifier and Type | Method and Description |
|---|---|
void |
deployModule(java.lang.String moduleName)
Deploy a module programmatically
|
void |
deployModule(java.lang.String moduleName,
int instances)
Deploy a module programmatically
|
void |
deployModule(java.lang.String moduleName,
JsonObject config)
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<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,
int instances)
Deploy a verticle programmatically
|
void |
deployVerticle(java.lang.String main,
JsonObject config)
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<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,
Handler<java.lang.String> doneHandler)
Deploy a worker verticle programmatically
|
void |
exit()
Cause the container to exit
|
JsonObject |
getConfig()
Get the verticle configuration
|
java.util.Map<java.lang.String,java.lang.String> |
getEnv()
Get an umodifiable map of system, environment variables.
|
Logger |
getLogger()
Get the verticle logger
|
void |
undeployModule(java.lang.String deploymentID)
Undeploy a module
|
void |
undeployModule(java.lang.String deploymentID,
Handler<java.lang.Void> doneHandler)
Undeploy a module
|
void |
undeployVerticle(java.lang.String deploymentID)
Undeploy a verticle
|
void |
undeployVerticle(java.lang.String deploymentID,
Handler<java.lang.Void> doneHandler)
Undeploy a module
|
public Container(VerticleManager mgr)
public void deployWorkerVerticle(java.lang.String main)
main - The main of the verticlepublic void deployWorkerVerticle(java.lang.String main,
int instances)
main - The main of the verticleinstances - The number of instances to deploy (defaults to 1)public void deployWorkerVerticle(java.lang.String main,
JsonObject config)
main - The main of the verticleconfig - JSON config to provide to the verticlepublic void 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)public void deployWorkerVerticle(java.lang.String main,
JsonObject config,
int instances,
Handler<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 completepublic void deployModule(java.lang.String moduleName)
moduleName - The main of the module to deploypublic void deployModule(java.lang.String moduleName,
int instances)
moduleName - The main of the module to deployinstances - The number of instances to deploy (defaults to 1)public void deployModule(java.lang.String moduleName,
JsonObject config)
moduleName - The main of the module to deployconfig - JSON config to provide to the modulepublic void 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)public void deployModule(java.lang.String moduleName,
JsonObject config,
int instances,
Handler<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 completepublic void deployVerticle(java.lang.String main)
main - The main of the verticlepublic void deployVerticle(java.lang.String main,
int instances)
main - The main of the verticleinstances - The number of instances to deploy (defaults to 1)public void deployVerticle(java.lang.String main,
JsonObject config)
main - The main of the verticleconfig - JSON config to provide to the verticlepublic void 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)public void deployVerticle(java.lang.String main,
JsonObject config,
int instances,
Handler<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 completepublic void undeployVerticle(java.lang.String deploymentID)
deploymentID - The deployment IDpublic void undeployVerticle(java.lang.String deploymentID,
Handler<java.lang.Void> doneHandler)
deploymentID - The deployment IDdoneHandler - The handler will be called when undeployment is completepublic void undeployModule(java.lang.String deploymentID)
deploymentID - The deployment IDpublic void undeployModule(java.lang.String deploymentID,
Handler<java.lang.Void> doneHandler)
deploymentID - The deployment IDdoneHandler - The handler will be called when undeployment is completepublic JsonObject getConfig()
public Logger getLogger()
public void exit()
public java.util.Map<java.lang.String,java.lang.String> getEnv()