public interface PlatformManager
| Modifier and Type | Method and Description |
|---|---|
void |
deployModule(java.lang.String moduleName,
JsonObject config,
int instances,
Handler<AsyncResult<java.lang.String>> doneHandler)
Deploy a module
|
void |
deployModuleFromZip(java.lang.String zipFileName,
JsonObject config,
int instances,
Handler<AsyncResult<java.lang.String>> doneHandler)
Deploy a module from a zip file.
|
void |
deployVerticle(java.lang.String main,
JsonObject config,
java.net.URL[] classpath,
int instances,
java.lang.String includes,
Handler<AsyncResult<java.lang.String>> doneHandler)
Deploy a verticle
|
void |
deployWorkerVerticle(boolean multiThreaded,
java.lang.String main,
JsonObject config,
java.net.URL[] classpath,
int instances,
java.lang.String includes,
Handler<AsyncResult<java.lang.String>> doneHandler)
Deploy a worker verticle
|
void |
installModule(java.lang.String moduleName,
Handler<AsyncResult<java.lang.Void>> doneHandler)
Install a module into the filesystem
Vert.x will search in the configured repos to locate the module
|
java.util.Map<java.lang.String,java.lang.Integer> |
listInstances()
List all deployments, with deployment ID and number of instances
|
void |
pullInDependencies(java.lang.String moduleName,
Handler<AsyncResult<java.lang.Void>> doneHandler)
Pull in all the dependencies (the 'includes' and the 'deploys' fields in mod.json) and copy them into an
internal mods directory in the module.
|
void |
registerExitHandler(Handler<java.lang.Void> handler)
Register a handler that will be called when the platform exits because of a verticle calling container.exit()
|
void |
stop()
Stop the platform manager
|
void |
undeploy(java.lang.String deploymentID,
Handler<AsyncResult<java.lang.Void>> doneHandler)
Undeploy a deployment
|
void |
undeployAll(Handler<AsyncResult<java.lang.Void>> doneHandler)
Undeploy all verticles and modules
|
void |
uninstallModule(java.lang.String moduleName,
Handler<AsyncResult<java.lang.Void>> doneHandler)
Uninstall a module from the filesystem
|
Vertx |
vertx() |
void deployVerticle(java.lang.String main,
JsonObject config,
java.net.URL[] classpath,
int instances,
java.lang.String includes,
Handler<AsyncResult<java.lang.String>> doneHandler)
main - The main, e.g. app.js, foo.rb, org.mycompany.MyMain, etcconfig - Any JSON config to pass to the verticle, or null if noneclasspath - The classpath for the verticleinstances - The number of instances to deployincludes - Comma separated list of modules to include, or null if nonedoneHandler - Handler will be called with deploymentID when deployed, or null if it fails to deployvoid deployWorkerVerticle(boolean multiThreaded,
java.lang.String main,
JsonObject config,
java.net.URL[] classpath,
int instances,
java.lang.String includes,
Handler<AsyncResult<java.lang.String>> doneHandler)
multiThreaded - Is it a multi-threaded worker verticle?main - The main, e.g. app.js, foo.rb, org.mycompany.MyMain, etcconfig - Any JSON config to pass to the verticle, or null if noneclasspath - The classpath for the verticleinstances - The number of instances to deployincludes - Comma separated list of modules to include, or null if nonedoneHandler - Handler will be called with deploymentID when deployed, or null if it fails to deployvoid deployModule(java.lang.String moduleName,
JsonObject config,
int instances,
Handler<AsyncResult<java.lang.String>> doneHandler)
moduleName - The name of the module to deployconfig - Any JSON config to pass to the verticle, or null if noneinstances - The number of instances to deploydoneHandler - Handler will be called with deploymentID when deployed, or null if it fails to deployvoid deployModuleFromZip(java.lang.String zipFileName,
JsonObject config,
int instances,
Handler<AsyncResult<java.lang.String>> doneHandler)
zipFileName - The name of the zip file that contains the moduleconfig - Any JSON config to pass to the verticle, or null if noneinstances - The number of instances to deploydoneHandler - Handler will be called with deploymentID when deployed, or null if it fails to deployvoid undeploy(java.lang.String deploymentID,
Handler<AsyncResult<java.lang.Void>> doneHandler)
deploymentID - The ID of the deployment to undeploy, as given in the doneHandler when deployingdoneHandler - The done handler will be called when deployment is complete or failsvoid undeployAll(Handler<AsyncResult<java.lang.Void>> doneHandler)
doneHandler - The done handler will be called when completejava.util.Map<java.lang.String,java.lang.Integer> listInstances()
void installModule(java.lang.String moduleName,
Handler<AsyncResult<java.lang.Void>> doneHandler)
moduleName - The name of the modulevoid uninstallModule(java.lang.String moduleName,
Handler<AsyncResult<java.lang.Void>> doneHandler)
moduleName - void pullInDependencies(java.lang.String moduleName,
Handler<AsyncResult<java.lang.Void>> doneHandler)
moduleName - The name of the modulevoid registerExitHandler(Handler<java.lang.Void> handler)
handler - The handlerVertx vertx()
void stop()