Class ProvidedVertxInstance

  • All Implemented Interfaces:
    java.io.Serializable, VertxInstance, org.hibernate.service.Service

    public final class ProvidedVertxInstance
    extends java.lang.Object
    implements VertxInstance
    An implementation of VertxInstance which allows the client to provide an instance of Vertx whose lifecycle is managed externally to Hibernate Reactive. The ProvidedVertxInstance must be registered explicitly with Hibernate by calling StandardServiceRegistryBuilder.addService(java.lang.Class<T>, T).

    Hibernate Reactive won't stop the Vert.x instance at shutdown.

     new ReactiveServiceRegistryBuilder()
         .applySettings( properties )
         .addService( VertxInstance.class, new ProvidedVertxInstance( vertx ) )
         .build();
     
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ProvidedVertxInstance​(io.vertx.core.Vertx vertx)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      io.vertx.core.Vertx getVertx()
      Obtain the instance of Vertx.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ProvidedVertxInstance

        public ProvidedVertxInstance​(io.vertx.core.Vertx vertx)
    • Method Detail

      • getVertx

        public io.vertx.core.Vertx getVertx()
        Description copied from interface: VertxInstance
        Obtain the instance of Vertx.
        Specified by:
        getVertx in interface VertxInstance