- java.lang.Object
- 
- org.omnifaces.cdi.eager.EagerBeansRepository
 
- 
 @ApplicationScoped public class EagerBeansRepository extends Object Bean repository via which various types of eager beans can be instantiated on demand.- Since:
- 1.8
- Author:
- Arjan Tijms
 
- 
- 
Constructor SummaryConstructors Constructor Description EagerBeansRepository()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EagerBeansRepositorygetInstance()Awkward workaround for it being unavailable viaInjectin listeners in Tomcat+OWB and Jetty.protected booleanhasAnyApplicationScopedBeans()Returnstrueif there are any application scoped eager beans.protected booleanhasAnySessionOrRequestURIBeans()Returnstrueif there are any session scoped eager beans or eager beans by request URI.protected booleanhasAnyViewIdBeans()Returnstrueif there are any eager beans by view ID.booleaninstantiateApplicationScoped()Instantiate application scoped eager beans.static voidinstantiateApplicationScopedAndRegisterListenerIfNecessary(ServletContext servletContext)Instantiate application scoped eager beans and registerEagerBeansWebListenerif necessary.booleaninstantiateByRequestURI(String relativeRequestURI)Instantiate eager beans by request URI.booleaninstantiateByViewID(String viewId)Instantiate eager beans by view ID.booleaninstantiateSessionScoped()Instantiate session scoped eager beans.protected voidsetEagerBeans(org.omnifaces.cdi.eager.EagerBeansRepository.EagerBeans eagerBeans)Sets the collected eager beans.
 
- 
- 
- 
Method Detail- 
getInstancepublic static EagerBeansRepository getInstance() Awkward workaround for it being unavailable viaInjectin listeners in Tomcat+OWB and Jetty.- Returns:
- Current instance of EagerBeansRepository.
 
 - 
setEagerBeansprotected void setEagerBeans(org.omnifaces.cdi.eager.EagerBeansRepository.EagerBeans eagerBeans) Sets the collected eager beans. This is invoked byEagerExtension.load(jakarta.enterprise.inject.spi.AfterDeploymentValidation, BeanManager).- Parameters:
- eagerBeans- The collected eager beans.
 
 - 
instantiateApplicationScopedAndRegisterListenerIfNecessarypublic static void instantiateApplicationScopedAndRegisterListenerIfNecessary(ServletContext servletContext) Instantiate application scoped eager beans and registerEagerBeansWebListenerif necessary.- Parameters:
- servletContext- The involved servlet context.
 
 - 
hasAnyApplicationScopedBeansprotected boolean hasAnyApplicationScopedBeans() Returnstrueif there are any application scoped eager beans.- Returns:
- trueif there are any application scoped eager beans.
 
 - 
hasAnySessionOrRequestURIBeansprotected boolean hasAnySessionOrRequestURIBeans() Returnstrueif there are any session scoped eager beans or eager beans by request URI.- Returns:
- trueif there are any session scoped eager beans or eager beans by request URI.
 
 - 
hasAnyViewIdBeansprotected boolean hasAnyViewIdBeans() Returnstrueif there are any eager beans by view ID.- Returns:
- trueif there are any eager beans by view ID.
 
 - 
instantiateApplicationScopedpublic boolean instantiateApplicationScoped() Instantiate application scoped eager beans.- Returns:
- trueif there were any application scoped eager beans.
 
 - 
instantiateSessionScopedpublic boolean instantiateSessionScoped() Instantiate session scoped eager beans.- Returns:
- trueif there were any session scoped eager beans.
 
 - 
instantiateByRequestURIpublic boolean instantiateByRequestURI(String relativeRequestURI) Instantiate eager beans by request URI.- Parameters:
- relativeRequestURI- The context-relative request URI;
- Returns:
- trueif there were any eager beans by request URI.
 
 - 
instantiateByViewIDpublic boolean instantiateByViewID(String viewId) Instantiate eager beans by view ID.- Parameters:
- viewId- The view ID;
- Returns:
- trueif there were any eager beans by view URI.
 
 
- 
 
-