Package org.omnifaces.cdi.eager
Class EagerExtension
- java.lang.Object
-
- org.omnifaces.cdi.eager.EagerExtension
-
- All Implemented Interfaces:
Extension
public class EagerExtension extends Object implements Extension
CDI extension that collects beans annotated with@
Eager
. After deployment collected beans are transferred to theEagerBeansRepository
.- Since:
- 1.8
- Author:
- Arjan Tijms
-
-
Constructor Summary
Constructors Constructor Description EagerExtension()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> void
collect(ProcessBean<T> event, BeanManager beanManager)
Collect beans annotated withEager
intoEagerBeansRepository.EagerBeans
.void
load(AfterDeploymentValidation event, BeanManager beanManager)
Load collected beans annotated withEager
intoEagerBeansRepository
viaEagerBeansRepository.setEagerBeans(org.omnifaces.cdi.eager.EagerBeansRepository.EagerBeans)
.
-
-
-
Method Detail
-
collect
public <T> void collect(@Observes ProcessBean<T> event, BeanManager beanManager)
Collect beans annotated withEager
intoEagerBeansRepository.EagerBeans
.- Type Parameters:
T
- The generic bean type.- Parameters:
event
- The process bean event.beanManager
- The involved bean manager.
-
load
public void load(@Observes AfterDeploymentValidation event, BeanManager beanManager)
Load collected beans annotated withEager
intoEagerBeansRepository
viaEagerBeansRepository.setEagerBeans(org.omnifaces.cdi.eager.EagerBeansRepository.EagerBeans)
.- Parameters:
event
- The after deployment validation event.beanManager
- The involved bean manager.
-
-