Class CheckingVertxContext
java.lang.Object
org.hibernate.reactive.context.impl.VertxContext
io.quarkus.hibernate.reactive.runtime.customized.CheckingVertxContext
- All Implemented Interfaces:
Serializable,Executor,org.hibernate.reactive.context.Context,org.hibernate.service.Service,org.hibernate.service.spi.ServiceRegistryAwareService
public final class CheckingVertxContext
extends org.hibernate.reactive.context.impl.VertxContext
The
VertxContext in Hibernate Reactive is accessing the
Vert.x context directly, assuming this is the correct context as
intended by the developer, as Hibernate Reactive has no opinion in
regard to how Vert.x is integrated with other components.
The precise definition of "correct context" will most likely depend
on the runtime model and how other components are integrated with Vert.x;
in particular the lifecycle of the context needs to be specified.
For example in Quarkus's RestEasy Reactive we ensure that each request
will run on a separate context; this ensures operations relating to
different web requests are isolated among each other.
To ensure that Quarkus users are using Hibernate Reactive on a context
which is compatible with its expectations, this alternative implementation
of VertxContext actually checks on each context access if it's safe
to use by invoking VertxContextSafetyToggle.validateContextIfExists(String, String).- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.reactive.context.Context
org.hibernate.reactive.context.Context.Key<T> -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.hibernate.reactive.context.impl.VertxContext
execute, injectServices
-
Constructor Details
-
CheckingVertxContext
public CheckingVertxContext()
-
-
Method Details
-
put
public <T> void put(org.hibernate.reactive.context.Context.Key<T> key, T instance) - Specified by:
putin interfaceorg.hibernate.reactive.context.Context- Overrides:
putin classorg.hibernate.reactive.context.impl.VertxContext
-
get
public <T> T get(org.hibernate.reactive.context.Context.Key<T> key) - Specified by:
getin interfaceorg.hibernate.reactive.context.Context- Overrides:
getin classorg.hibernate.reactive.context.impl.VertxContext
-
remove
public void remove(org.hibernate.reactive.context.Context.Key<?> key) - Specified by:
removein interfaceorg.hibernate.reactive.context.Context- Overrides:
removein classorg.hibernate.reactive.context.impl.VertxContext
-