public interface VerticleFactory
Implementations of this are responsible for creating verticle written in various different JVM languages and for other purposes.
| Modifier and Type | Method and Description |
|---|---|
default void |
close()
Close the factory.
|
void |
createVerticle(String verticleName,
ClassLoader classLoader,
Promise<Callable<Verticle>> promise)
Create a verticle instance.
|
default void |
init(Vertx vertx)
Initialise the factory
|
default int |
order()
The order of the factory.
|
String |
prefix() |
static String |
removePrefix(String identifer)
Helper method to remove a prefix from an identifier string
|
default boolean |
requiresResolve()
Does the factory require resolution? See
#resolve(String, DeploymentOptions, ClassLoader, Future) for more
information. |
default void |
resolve(String identifier,
DeploymentOptions deploymentOptions,
ClassLoader classLoader,
Promise<String> resolution)
Some verticle factories can "resolve" the identifer to another identifier which is then used to look up the real
verticle factory.
|
static String removePrefix(String identifer)
identifer - the identifierdefault int order()
default boolean requiresResolve()
#resolve(String, DeploymentOptions, ClassLoader, Future) for more
information.default void resolve(String identifier, DeploymentOptions deploymentOptions, ClassLoader classLoader, Promise<String> resolution)
identifier - The identifierdeploymentOptions - The deployment options - these can be changed inside the resolve method (e.g. to add an extra classpath)classLoader - The classloaderresolution - A future which will receive the result of the resolution.default void init(Vertx vertx)
vertx - The Vert.x instancedefault void close()
String prefix()
void createVerticle(String verticleName, ClassLoader classLoader, Promise<Callable<Verticle>> promise)
Vertx.executeBlocking(io.vertx.core.Handler<io.vertx.core.Promise<T>>, boolean, io.vertx.core.Handler<io.vertx.core.AsyncResult<T>>).verticleName - The verticle nameclassLoader - The class loaderpromise - the promise to complete with the resultCopyright © 2019 Eclipse. All rights reserved.