Ejemplo n.º 1
0
 /**
  * Deploy a worker verticle programmatically
  *
  * @param main The main of the verticle
  * @param config JSON config to provide to the verticle
  * @param instances The number of instances to deploy (defaults to 1)
  * @param doneHandler The handler will be called passing in the unique deployment id when
  *     deployment is complete
  */
 public void deployWorkerVerticle(
     String main,
     JsonObject config,
     int instances,
     boolean multiThreaded,
     Handler<String> doneHandler) {
   URL[] currURLs = mgr.getDeploymentURLs();
   File modDir = mgr.getDeploymentModDir();
   mgr.deployVerticle(
       true, multiThreaded, main, config, currURLs, instances, modDir, null, doneHandler);
 }
Ejemplo n.º 2
0
 /** Cause the container to exit */
 public void exit() {
   mgr.unblock();
 }
Ejemplo n.º 3
0
 /**
  * Get the verticle logger
  *
  * @return The logger
  */
 public Logger getLogger() {
   return mgr.getLogger();
 }
Ejemplo n.º 4
0
 /**
  * Get the verticle configuration
  *
  * @return a JSON object representing the configuration
  */
 public JsonObject getConfig() {
   return mgr.getConfig();
 }
Ejemplo n.º 5
0
 /**
  * Undeploy a module
  *
  * @param deploymentID The deployment ID
  * @param doneHandler The handler will be called when undeployment is complete
  */
 public void undeployModule(String deploymentID, Handler<Void> doneHandler) {
   mgr.undeploy(deploymentID, doneHandler);
 }
Ejemplo n.º 6
0
 /**
  * Deploy a verticle programmatically
  *
  * @param main The main of the verticle
  * @param config JSON config to provide to the verticle
  * @param instances The number of instances to deploy (defaults to 1)
  * @param doneHandler The handler will be called passing in the unique deployment id when
  *     deployment is complete
  */
 public void deployVerticle(
     String main, JsonObject config, int instances, Handler<String> doneHandler) {
   URL[] currURLs = mgr.getDeploymentURLs();
   File modDir = mgr.getDeploymentModDir();
   mgr.deployVerticle(false, false, main, config, currURLs, instances, modDir, null, doneHandler);
 }
Ejemplo n.º 7
0
 /**
  * Deploy a module programmatically
  *
  * @param moduleName The main of the module to deploy
  * @param config JSON config to provide to the module
  * @param instances The number of instances to deploy (defaults to 1)
  * @param doneHandler The handler will be called passing in the unique deployment id when
  *     deployment is complete
  */
 public void deployModule(
     String moduleName, JsonObject config, int instances, Handler<String> doneHandler) {
   File modDir = mgr.getDeploymentModDir();
   mgr.deployMod(moduleName, config, instances, modDir, doneHandler);
 }