Class ProvidedVertxInstance
java.lang.Object
org.hibernate.reactive.vertx.impl.ProvidedVertxInstance
- All Implemented Interfaces:
Serializable,VertxInstance,org.hibernate.service.Service
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:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ProvidedVertxInstance
public ProvidedVertxInstance(io.vertx.core.Vertx vertx)
-
-
Method Details
-
getVertx
public io.vertx.core.Vertx getVertx()Description copied from interface:VertxInstanceObtain the instance ofVertx.- Specified by:
getVertxin interfaceVertxInstance
-