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 boolean | 
blockingCreate()
If the  
createVerticle(String, ClassLoader) method might be slow Vert.x will call it using a worker
 thread instead of an event loop if this returns true | 
default void | 
close()
Close the factory. 
 | 
Verticle | 
createVerticle(String verticleName,
              ClassLoader classLoader)
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 boolean blockingCreate()
createVerticle(String, ClassLoader) method might be slow Vert.x will call it using a worker
 thread instead of an event loop if this returns truecreateVerticle(String, ClassLoader) should be called on a worker thread.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()
Verticle createVerticle(String verticleName, ClassLoader classLoader) throws Exception
blockingCreate().verticleName - The verticle nameclassLoader - The class loaderExceptionCopyright © 2020 Eclipse. All rights reserved.