コード例 #1
0
ファイル: Container.java プロジェクト: jhgao/vert.x
 /**
  * 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);
 }
コード例 #2
0
ファイル: Container.java プロジェクト: jhgao/vert.x
 /** Cause the container to exit */
 public void exit() {
   mgr.unblock();
 }
コード例 #3
0
ファイル: Container.java プロジェクト: jhgao/vert.x
 /**
  * Get the verticle logger
  *
  * @return The logger
  */
 public Logger getLogger() {
   return mgr.getLogger();
 }
コード例 #4
0
ファイル: Container.java プロジェクト: jhgao/vert.x
 /**
  * Get the verticle configuration
  *
  * @return a JSON object representing the configuration
  */
 public JsonObject getConfig() {
   return mgr.getConfig();
 }
コード例 #5
0
ファイル: Container.java プロジェクト: jhgao/vert.x
 /**
  * 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);
 }
コード例 #6
0
ファイル: Container.java プロジェクト: jhgao/vert.x
 /**
  * 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);
 }
コード例 #7
0
ファイル: Container.java プロジェクト: jhgao/vert.x
 /**
  * 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);
 }