Class AbstractCdiBeanSupplier<T>
- java.lang.Object
-
- org.glassfish.jersey.ext.cdi1x.internal.AbstractCdiBeanSupplier<T>
-
- All Implemented Interfaces:
Supplier<T>,DisposableSupplier<T>
- Direct Known Subclasses:
GenericCdiBeanSupplier,RequestScopedCdiBeanSupplier
public abstract class AbstractCdiBeanSupplier<T> extends Object implements 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 annotatedSupplier.get()method that could just delegate to the existing_provide()method.- Author:
- Jakub Podlesak
-
-
Constructor Summary
Constructors Constructor Description AbstractCdiBeanSupplier(Class<T> rawType, InjectionManager injectionManager, jakarta.enterprise.inject.spi.BeanManager beanManager, boolean cdiManaged)Create new factory instance for given type and bean manager.
-
-
-
Constructor Detail
-
AbstractCdiBeanSupplier
public AbstractCdiBeanSupplier(Class<T> rawType, 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 totrueif the component should be managed by CDI.
-
-
Method Detail
-
dispose
public void dispose(T instance)
- Specified by:
disposein interfaceDisposableSupplier<T>
-
-