/** * 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); }
/** Cause the container to exit */ public void exit() { mgr.unblock(); }
/** * Get the verticle logger * * @return The logger */ public Logger getLogger() { return mgr.getLogger(); }
/** * Get the verticle configuration * * @return a JSON object representing the configuration */ public JsonObject getConfig() { return mgr.getConfig(); }
/** * 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); }
/** * 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); }
/** * 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); }