final String deployMsg = "deploying module"; if (hasClasspath) { mgr.deployModuleFromClasspath(main, conf, instances, classpath, createLoggingHandler(deployMsg, doneHandler)); } else if (ha) { mgr.deployModule(main, conf, instances, true, createLoggingHandler(deployMsg, doneHandler));
/** * Deploy a module from the classpath. The classpath must contain a single mod.json and the resources for that module only. * * @param moduleName The name of the module to deploy * @param config Any JSON config to pass to the verticle, or null if none * @param instances The number of instances to deploy * @param classpath Array of URLS corresponding to the classpath for the module * @return Promise of deployment */ @Override public Promise<String> deployModuleFromClasspath(String moduleName, JsonObject config, int instances, URL[] classpath) { final Deferred<String> d = when.defer(); manager.deployModuleFromClasspath(moduleName, config, instances, classpath, result -> { if (result.succeeded()) { d.resolve(result.result()); } else { d.reject(result.cause()); } }); return d.getPromise(); }