Class VertxProducer


  • @ApplicationScoped
    public class VertxProducer
    extends Object
    Expose the Vert.x event bus and produces Mutiny instances.

    The original Vert.x instance is coming from the core artifact. IMPL NOTE: There is no need to cache the mutiny locally because the bean instances are stored in the singleton context, i.e. the producer method is only called once.

    • Constructor Detail

      • VertxProducer

        public VertxProducer()
    • Method Detail

      • eventbus

        @Singleton
        @Produces
        public io.vertx.core.eventbus.EventBus eventbus​(io.vertx.core.Vertx vertx)
      • mutiny

        @Singleton
        @Produces
        public io.vertx.mutiny.core.Vertx mutiny​(io.vertx.core.Vertx vertx)
      • mutinyEventBus

        @Singleton
        @Produces
        public io.vertx.mutiny.core.eventbus.EventBus mutinyEventBus​(io.vertx.mutiny.core.Vertx mutiny)
      • undeployVerticles

        void undeployVerticles​(@Observes @BeforeDestroyed(javax.enterprise.context.ApplicationScoped.class)
                               Object event,
                               javax.enterprise.inject.spi.BeanManager beanManager)
        Undeploy verticles backed by contextual instances of ApplicationScoped beans before the application context is destroyed. Otherwise Vertx may attempt to stop the verticles after the CDI container is shut down.
        Parameters:
        event -
        beanManager -