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.

@FunctionalInterface public interface VertxFactory
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 Type
    Method
    Description
    io.vertx.core.Vertx
    Creates or returns a Vertx instance.
  • Method Details

    • create

      io.vertx.core.Vertx create()
      Creates or returns a Vertx instance.
      Returns:
      the Vert.x instance