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
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 Summary
ConstructorDescriptionAbstractCdiBeanSupplier
(Class<T> rawType, InjectionManager injectionManager, jakarta.enterprise.inject.spi.BeanManager beanManager, boolean cdiManaged) Create new factory instance for given type and bean manager. -
Method Summary
-
Constructor Details
-
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 totrue
if the component should be managed by CDI.
-
-
Method Details
-
dispose
Description copied from interface:DisposableSupplier
This method will dispose the provided object created by thisSupplier
.- Specified by:
dispose
in interfaceDisposableSupplier<T>
- Parameters:
instance
- the instance to be disposed.
-