Interface VertxFactory
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Factory for creating
Vertx instances.
Implementations are discovered via ServiceLoader. If no implementation is found, the
default manager falls back to Vertx.vertx().
A custom implementation can be registered by placing a file named
META-INF/services/dev.resteasy.vertx.spi.VertxFactory on the classpath containing the
fully qualified class name of the implementation. For example, to reuse an existing Vertx instance:
public class MyVertxFactory implements VertxFactory {
public Vertx create() {
return MyApplication.getSharedVertx();
}
}
- Author:
- James R. Perkins
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionio.vertx.core.Vertxcreate()Creates or returns aVertxinstance.
-
Method Details
-
create
io.vertx.core.Vertx create()Creates or returns aVertxinstance.- Returns:
- the Vert.x instance
-