org.vertx.java.deploy

## Class Container

- java.lang.Object
- - org.vertx.java.deploy.Container

    public class Container
    extends java.lang.Object

This class represents the container in which a verticle runs.

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 Summary

Constructors
Constructor and Description
`Container(org.vertx.java.deploy.impl.VerticleManager mgr)`

### Method Summary

Methods
`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

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### Container

    public Container(org.vertx.java.deploy.impl.VerticleManager mgr)

### Method Detail

#### deployWorkerVerticle

    public void deployWorkerVerticle(java.lang.String main)

Deploy a worker verticle programmatically

Parameters:
  `main` - The main of the verticle

#### deployWorkerVerticle

    public void deployWorkerVerticle(java.lang.String main,
                            int instances)

Deploy a worker verticle programmatically

Parameters:
  `main` - The main of the verticle
  `instances` - The number of instances to deploy (defaults to 1)

#### deployWorkerVerticle

    public void deployWorkerVerticle(java.lang.String main,
                            JsonObject config)

Deploy a worker verticle programmatically

Parameters:
  `main` - The main of the verticle
  `config` - JSON config to provide to the verticle

#### deployWorkerVerticle

    public void deployWorkerVerticle(java.lang.String main,
                            JsonObject config,
                            int instances)

Deploy a worker verticle programmatically

Parameters:
  `main` - The main of the verticle
  `config` - JSON config to provide to the verticle
  `instances` - The number of instances to deploy (defaults to 1)

#### deployWorkerVerticle

    public void deployWorkerVerticle(java.lang.String main,
                            JsonObject config,
                            int instances,
                            Handler<java.lang.String> doneHandler)

Deploy a worker verticle programmatically

Parameters:
  `main` - The main of the verticle
  `config` - JSON config to provide to the verticle
  `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 complete

#### deployModule

    public void deployModule(java.lang.String moduleName)

Deploy a module programmatically

Parameters:
  `moduleName` - The main of the module to deploy

#### deployModule

    public void deployModule(java.lang.String moduleName,
                    int instances)

Deploy a module programmatically

Parameters:
  `moduleName` - The main of the module to deploy
  `instances` - The number of instances to deploy (defaults to 1)

#### deployModule

    public void deployModule(java.lang.String moduleName,
                    JsonObject config)

Deploy a module programmatically

Parameters:
  `moduleName` - The main of the module to deploy
  `config` - JSON config to provide to the module

#### deployModule

    public void deployModule(java.lang.String moduleName,
                    JsonObject config,
                    int instances)

Deploy a module programmatically

Parameters:
  `moduleName` - The main of the module to deploy
  `config` - JSON config to provide to the module
  `instances` - The number of instances to deploy (defaults to 1)

#### deployModule

    public void deployModule(java.lang.String moduleName,
                    JsonObject config,
                    int instances,
                    Handler<java.lang.String> doneHandler)

Deploy a module programmatically

Parameters:
  `moduleName` - The main of the module to deploy
  `config` - JSON config to provide to the module
  `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 complete

#### deployVerticle

    public void deployVerticle(java.lang.String main)

Deploy a worker verticle programmatically

Parameters:
  `main` - The main of the verticle

#### deployVerticle

    public void deployVerticle(java.lang.String main,
                      int instances)

Deploy a verticle programmatically

Parameters:
  `main` - The main of the verticle
  `instances` - The number of instances to deploy (defaults to 1)

#### deployVerticle

    public void deployVerticle(java.lang.String main,
                      JsonObject config)

Deploy a verticle programmatically

Parameters:
  `main` - The main of the verticle
  `config` - JSON config to provide to the verticle

#### deployVerticle

    public void deployVerticle(java.lang.String main,
                      JsonObject config,
                      int instances)

Deploy a verticle programmatically

Parameters:
  `main` - The main of the verticle
  `config` - JSON config to provide to the verticle
  `instances` - The number of instances to deploy (defaults to 1)

#### deployVerticle

    public void deployVerticle(java.lang.String main,
                      JsonObject config,
                      int instances,
                      Handler<java.lang.String> doneHandler)

Deploy a verticle programmatically

Parameters:
  `main` - The main of the verticle
  `config` - JSON config to provide to the verticle
  `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 complete

#### undeployVerticle

    public void undeployVerticle(java.lang.String deploymentID)

Undeploy a verticle

Parameters:
  `deploymentID` - The deployment ID

#### undeployVerticle

    public void undeployVerticle(java.lang.String deploymentID,
                        Handler<java.lang.Void> doneHandler)

Undeploy a module

Parameters:
  `deploymentID` - The deployment ID
  `doneHandler` - The handler will be called when undeployment is complete

#### undeployModule

    public void undeployModule(java.lang.String deploymentID)

Undeploy a module

Parameters:
  `deploymentID` - The deployment ID

#### undeployModule

    public void undeployModule(java.lang.String deploymentID,
                      Handler<java.lang.Void> doneHandler)

Undeploy a module

Parameters:
  `deploymentID` - The deployment ID
  `doneHandler` - The handler will be called when undeployment is complete

#### getConfig

    public JsonObject getConfig()

Get the verticle configuration

Returns:
  a JSON object representing the configuration

#### getLogger

    public Logger getLogger()

Get the verticle logger

Returns:
  The logger

#### exit

    public void exit()

Cause the container to exit

#### getEnv

    public java.util.Map<java.lang.String,java.lang.String> getEnv()

Get an umodifiable map of system, environment variables.

Returns:
  The map