Package org.jboss.weld.bean
Class RIBean<T>
- java.lang.Object
-
- org.jboss.weld.util.bean.ForwardingBeanAttributes<T>
-
- org.jboss.weld.bean.CommonBean<T>
-
- org.jboss.weld.bean.RIBean<T>
-
- All Implemented Interfaces:
Contextual<T>,Bean<T>,BeanAttributes<T>,PassivationCapable,WeldBean<T>
- Direct Known Subclasses:
AbstractBean,AbstractBuiltInBean
public abstract class RIBean<T> extends CommonBean<T> implements PassivationCapable
Abstract base class with functions specific to RI built-in beans- Author:
- Pete Muir
-
-
Field Summary
Fields Modifier and Type Field Description protected BeanManagerImplbeanManager
-
Constructor Summary
Constructors Modifier Constructor Description protectedRIBean(BeanAttributes<T> attributes, org.jboss.weld.serialization.spi.BeanIdentifier identifier, BeanManagerImpl beanManager)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidcleanupAfterBoot()This method is called after the container is started allowing the bean to release any resources that are only required at boot timevoiddestroy(T instance, CreationalContext<T> creationalContext)Destroy an instance of the contextual type.Class<?>getBeanClass()The bean class of the managed bean or session bean or of the bean that declares the producer method or field.BeanManagerImplgetBeanManager()ContextualInstanceStrategy<T>getContextualInstanceStrategy()Set<QualifierInstance>getQualifierInstances()abstract Class<T>getType()voidinitialize(BeanDeployerEnvironment environment)Initializes the bean and its metadata.abstract voidinitializeAfterBeanDiscovery()In particular cases, the deployer must perform some initialization operations only after all beans have been deployed (e.g.protected abstract voidinternalInitialize(BeanDeployerEnvironment environment)booleanisDependent()booleanisNormalScoped()abstract booleanisPassivationCapableBean()abstract booleanisPassivationCapableDependency()abstract booleanisProxyable()abstract booleanisProxyRequired()abstract voidpreInitialize()voidsetAttributes(BeanAttributes<T> attributes)-
Methods inherited from class org.jboss.weld.bean.CommonBean
attributes, equals, getId, getIdentifier, hashCode, isNullable, toString, unwrap
-
Methods inherited from class org.jboss.weld.util.bean.ForwardingBeanAttributes
getName, getQualifiers, getScope, getStereotypes, getTypes, isAlternative
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.enterprise.inject.spi.Bean
getInjectionPoints
-
Methods inherited from interface javax.enterprise.inject.spi.BeanAttributes
getName, getQualifiers, getScope, getStereotypes, getTypes, isAlternative
-
Methods inherited from interface javax.enterprise.context.spi.Contextual
create
-
Methods inherited from interface javax.enterprise.inject.spi.PassivationCapable
getId
-
Methods inherited from interface org.jboss.weld.bean.WeldBean
getPriority
-
-
-
-
Field Detail
-
beanManager
protected final BeanManagerImpl beanManager
-
-
Constructor Detail
-
RIBean
protected RIBean(BeanAttributes<T> attributes, org.jboss.weld.serialization.spi.BeanIdentifier identifier, BeanManagerImpl beanManager)
-
-
Method Detail
-
getBeanManager
public BeanManagerImpl getBeanManager()
-
getBeanClass
public Class<?> getBeanClass()
Description copied from interface:BeanThe bean class of the managed bean or session bean or of the bean that declares the producer method or field.- Specified by:
getBeanClassin interfaceBean<T>- Returns:
- the bean class
-
preInitialize
public abstract void preInitialize()
-
initialize
public final void initialize(BeanDeployerEnvironment environment)
Initializes the bean and its metadata. The method is synchronized and guarded by the RIBean object so that the initialization only occurs once.
-
internalInitialize
protected abstract void internalInitialize(BeanDeployerEnvironment environment)
-
cleanupAfterBoot
public abstract void cleanupAfterBoot()
This method is called after the container is started allowing the bean to release any resources that are only required at boot time
-
initializeAfterBeanDiscovery
public abstract void initializeAfterBeanDiscovery()
In particular cases, the deployer must perform some initialization operations only after all beans have been deployed (e.g. for initializing decorators taking into account the possibility of having custom decorators which are deployed through portable extensions)- Parameters:
environment-
-
isDependent
public boolean isDependent()
-
isNormalScoped
public boolean isNormalScoped()
-
isProxyable
public abstract boolean isProxyable()
-
isPassivationCapableBean
public abstract boolean isPassivationCapableBean()
-
isPassivationCapableDependency
public abstract boolean isPassivationCapableDependency()
-
isProxyRequired
public abstract boolean isProxyRequired()
-
getQualifierInstances
public Set<QualifierInstance> getQualifierInstances()
-
getContextualInstanceStrategy
public ContextualInstanceStrategy<T> getContextualInstanceStrategy()
-
setAttributes
public void setAttributes(BeanAttributes<T> attributes)
- Overrides:
setAttributesin classCommonBean<T>
-
destroy
public void destroy(T instance, CreationalContext<T> creationalContext)
Description copied from interface:ContextualDestroy an instance of the contextual type. Implementations should callCreationalContext.release()to allow the container to destroy dependent objects of the contextual instance.- Specified by:
destroyin interfaceContextual<T>- Parameters:
instance- the contextual instance to destroycreationalContext- the context in which this instance was created
-
-