Class VertxContext

  • All Implemented Interfaces:
    java.io.Serializable, java.util.concurrent.Executor, Context, org.hibernate.service.Service, org.hibernate.service.spi.ServiceRegistryAwareService

    public class VertxContext
    extends java.lang.Object
    implements Context, org.hibernate.service.spi.ServiceRegistryAwareService
    An adaptor for the Vert.x Context.
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.hibernate.reactive.context.Context

        Context.Key<T>
    • Constructor Summary

      Constructors 
      Constructor Description
      VertxContext()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute​(java.lang.Runnable runnable)
      Run the given command in a context.
      <T> T get​(Context.Key<T> key)
      Get a value associated with the current reactive stream, or return null.
      void injectServices​(org.hibernate.service.spi.ServiceRegistryImplementor serviceRegistry)  
      <T> void put​(Context.Key<T> key, T instance)
      Associate a value with the current reactive stream.
      void remove​(Context.Key<?> key)
      Remove a value associated with the current reactive stream.
      • Methods inherited from class java.lang.Object

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

      • VertxContext

        public VertxContext()
    • Method Detail

      • injectServices

        public void injectServices​(org.hibernate.service.spi.ServiceRegistryImplementor serviceRegistry)
        Specified by:
        injectServices in interface org.hibernate.service.spi.ServiceRegistryAwareService
      • put

        public <T> void put​(Context.Key<T> key,
                            T instance)
        Description copied from interface: Context
        Associate a value with the current reactive stream.
        Specified by:
        put in interface Context
      • get

        public <T> T get​(Context.Key<T> key)
        Description copied from interface: Context
        Get a value associated with the current reactive stream, or return null.
        Specified by:
        get in interface Context
      • remove

        public void remove​(Context.Key<?> key)
        Description copied from interface: Context
        Remove a value associated with the current reactive stream.
        Specified by:
        remove in interface Context
      • execute

        public void execute​(java.lang.Runnable runnable)
        Description copied from interface: Context
        Run the given command in a context. If there is a context already associated with the call, use that one. Otherwise, create a new context and execute the command in the new context. In case a new context is created, it will ensure a local context is created.
        Specified by:
        execute in interface Context
        Specified by:
        execute in interface java.util.concurrent.Executor