Class AbstractCdiBeanSupplier<T>

  • All Implemented Interfaces:
    Supplier<T>, org.glassfish.jersey.internal.inject.DisposableSupplier<T>
    Direct Known Subclasses:
    GenericCdiBeanSupplier, RequestScopedCdiBeanSupplier

    public abstract class AbstractCdiBeanSupplier<T>
    extends Object
    implements org.glassfish.jersey.internal.inject.DisposableSupplier<T>
    Abstract supplier to provide CDI components obtained from CDI bean manager. The factory handles CDI managed components as well as non-contextual managed beans. To specify scope of provided CDI beans, an extension of this supplier should implement properly annotated Supplier.get() method that could just delegate to the existing _provide() method.
    Author:
    Jakub Podlesak
    • Constructor Detail

      • AbstractCdiBeanSupplier

        public AbstractCdiBeanSupplier​(Class<T> rawType,
                                       org.glassfish.jersey.internal.inject.InjectionManager injectionManager,
                                       jakarta.enterprise.inject.spi.BeanManager beanManager,
                                       boolean cdiManaged)
        Create new factory instance for given type and bean manager.
        Parameters:
        rawType - type of the components to provide.
        injectionManager - actual injection manager instance.
        beanManager - current bean manager to get references from.
        cdiManaged - set to true if the component should be managed by CDI.
    • Method Detail

      • dispose

        public void dispose​(T instance)
        Specified by:
        dispose in interface org.glassfish.jersey.internal.inject.DisposableSupplier<T>