mgr.deployModuleFromZip(main, conf, instances, createLoggingHandler("deploying module from zip", doneHandler)); } else if (module) { final String deployMsg = "deploying module";
/** * Deploy a module from a zip file. The zip must contain a valid Vert.x module. Vert.x will automatically install the module from the zip into the local mods dir or the system mods dir (if it's a system module), or VERTX_MODS if set, and then deploy the module * * @param zipFileName The name of the zip file that contains the module * @param config Any JSON config to pass to the verticle, or null if none * @param instances The number of instances to deploy * @return Promise of deployment */ @Override public Promise<String> deployModuleFromZip(String zipFileName, JsonObject config, int instances) { final Deferred<String> d = when.defer(); manager.deployModuleFromZip(zipFileName, config, instances, result -> { if (result.succeeded()) { d.resolve(result.result()); } else { d.reject(result.cause()); } }); return d.getPromise(); }