Class ProvidedVertxInstance
- java.lang.Object
-
- org.hibernate.reactive.vertx.impl.ProvidedVertxInstance
-
- All Implemented Interfaces:
java.io.Serializable
,VertxInstance
,org.hibernate.service.Service
public final class ProvidedVertxInstance extends java.lang.Object implements VertxInstance
An implementation ofVertxInstance
which allows the client to provide an instance ofVertx
whose lifecycle is managed externally to Hibernate Reactive. TheProvidedVertxInstance
must be registered explicitly with Hibernate by callingStandardServiceRegistryBuilder.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 ofVertx
.
-
-
-
Method Detail
-
getVertx
public io.vertx.core.Vertx getVertx()
Description copied from interface:VertxInstance
Obtain the instance ofVertx
.- Specified by:
getVertx
in interfaceVertxInstance
-
-