Package org.jboss.weld.bean
Class SessionBean<T>
- java.lang.Object
-
- org.jboss.weld.util.bean.ForwardingBeanAttributes<T>
-
- org.jboss.weld.bean.CommonBean<T>
-
- org.jboss.weld.bean.RIBean<T>
-
- org.jboss.weld.bean.AbstractBean<T,Class<T>>
-
- org.jboss.weld.bean.AbstractClassBean<T>
-
- org.jboss.weld.bean.SessionBean<T>
-
- Type Parameters:
T- The type (class) of the bean
- All Implemented Interfaces:
javax.enterprise.context.spi.Contextual<T>,javax.enterprise.inject.spi.Bean<T>,javax.enterprise.inject.spi.BeanAttributes<T>,javax.enterprise.inject.spi.PassivationCapable,DecorableBean<T>
- Direct Known Subclasses:
NewSessionBean
public class SessionBean<T> extends AbstractClassBean<T>
An enterprise bean representation- Author:
- Pete Muir, Ales Justin
-
-
Field Summary
-
Fields inherited from class org.jboss.weld.bean.AbstractClassBean
annotatedType, enhancedAnnotatedItem
-
Fields inherited from class org.jboss.weld.bean.AbstractBean
type
-
Fields inherited from class org.jboss.weld.bean.RIBean
beanManager
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSessionBean(javax.enterprise.inject.spi.BeanAttributes<T> attributes, EnhancedAnnotatedType<T> type, InternalEjbDescriptor<T> ejbDescriptor, org.jboss.weld.serialization.spi.BeanIdentifier identifier, BeanManagerImpl manager)Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckConflictingRoles()Validates for non-conflicting rolesprotected voidcheckObserverMethods()If there are any observer methods, they must be static or business methods.protected voidcheckScopeAllowed()Check that the scope type is allowed by the stereotypes on the bean and the bean typeprotected voidcheckType()Tcreate(javax.enterprise.context.spi.CreationalContext<T> creationalContext)Creates an instance of the beanorg.jboss.weld.ejb.api.SessionObjectReferencecreateReference()voiddestroy(T instance, javax.enterprise.context.spi.CreationalContext<T> creationalContext)protected Set<MethodSignature>getBusinessMethodSignatures()InternalEjbDescriptor<T>getEjbDescriptor()voidinitializeAfterBeanDiscovery()In particular cases, the deployer must perform some initialization operations only after all beans have been deployed (e.g.voidinternalInitialize(BeanDeployerEnvironment environment)Initializes the bean and its metadatabooleanisClientCanCallRemoveMethods()protected booleanisInterceptionCandidate()booleanisPassivationCapableBean()booleanisPassivationCapableDependency()booleanisProxyable()static <T> SessionBean<T>of(javax.enterprise.inject.spi.BeanAttributes<T> attributes, InternalEjbDescriptor<T> ejbDescriptor, BeanManagerImpl beanManager, EnhancedAnnotatedType<T> type)Creates a simple, annotation defined Enterprise Web Bean using the annotations specified on typeprotected voidregisterInterceptors()protected voidspecialize()StringtoString()-
Methods inherited from class org.jboss.weld.bean.AbstractClassBean
checkBeanImplementation, cleanupAfterBoot, getAnnotated, getDecorators, getEnhancedAnnotated, getInjectionPoints, getInjectionTarget, getInterceptors, getProducer, hasDecorators, hasInterceptors, initType, preSpecialize, setInjectionTarget, setProducer, setProducer
-
Methods inherited from class org.jboss.weld.bean.AbstractBean
checkSpecialization, getSpecializedBeans, getType, isDependent, isProxyRequired, isSpecializing, postSpecialize, preInitialize
-
Methods inherited from class org.jboss.weld.bean.RIBean
getBeanClass, getBeanManager, getContextualInstanceStrategy, getQualifierInstances, initialize, isNormalScoped, setAttributes
-
Methods inherited from class org.jboss.weld.bean.CommonBean
attributes, equals, getId, getIdentifier, hashCode, isNullable, 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
-
-
-
-
Constructor Detail
-
SessionBean
protected SessionBean(javax.enterprise.inject.spi.BeanAttributes<T> attributes, EnhancedAnnotatedType<T> type, InternalEjbDescriptor<T> ejbDescriptor, org.jboss.weld.serialization.spi.BeanIdentifier identifier, BeanManagerImpl manager)
Constructor- Parameters:
type- The type of the beanmanager- The Bean manager
-
-
Method Detail
-
of
public static <T> SessionBean<T> of(javax.enterprise.inject.spi.BeanAttributes<T> attributes, InternalEjbDescriptor<T> ejbDescriptor, BeanManagerImpl beanManager, EnhancedAnnotatedType<T> type)
Creates a simple, annotation defined Enterprise Web Bean using the annotations specified on type- Type Parameters:
T- The type- Parameters:
beanManager- the current managertype- the AnnotatedType to use- Returns:
- An Enterprise Web Bean
-
internalInitialize
public void internalInitialize(BeanDeployerEnvironment environment)
Initializes the bean and its metadata- Overrides:
internalInitializein classAbstractClassBean<T>
-
checkConflictingRoles
protected void checkConflictingRoles()
Validates for non-conflicting roles
-
checkScopeAllowed
protected void checkScopeAllowed()
Check that the scope type is allowed by the stereotypes on the bean and the bean type
-
specialize
protected void specialize()
- Overrides:
specializein classAbstractBean<T,Class<T>>
-
create
public T create(javax.enterprise.context.spi.CreationalContext<T> creationalContext)
Creates an instance of the bean- Returns:
- The instance
-
destroy
public void destroy(T instance, javax.enterprise.context.spi.CreationalContext<T> creationalContext)
-
checkType
protected void checkType()
- Specified by:
checkTypein classAbstractBean<T,Class<T>>
-
getEjbDescriptor
public InternalEjbDescriptor<T> getEjbDescriptor()
-
isClientCanCallRemoveMethods
public boolean isClientCanCallRemoveMethods()
-
checkObserverMethods
protected void checkObserverMethods()
If there are any observer methods, they must be static or business methods.
-
getBusinessMethodSignatures
protected Set<MethodSignature> getBusinessMethodSignatures()
-
createReference
public org.jboss.weld.ejb.api.SessionObjectReference createReference()
-
isInterceptionCandidate
protected boolean isInterceptionCandidate()
- Specified by:
isInterceptionCandidatein classAbstractClassBean<T>
-
toString
public String toString()
- Overrides:
toStringin classCommonBean<T>
-
isProxyable
public boolean isProxyable()
- Specified by:
isProxyablein classRIBean<T>
-
isPassivationCapableBean
public boolean isPassivationCapableBean()
- Specified by:
isPassivationCapableBeanin classRIBean<T>
-
isPassivationCapableDependency
public boolean isPassivationCapableDependency()
- Specified by:
isPassivationCapableDependencyin classRIBean<T>
-
initializeAfterBeanDiscovery
public void initializeAfterBeanDiscovery()
Description copied from class:RIBeanIn 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)- Overrides:
initializeAfterBeanDiscoveryin classAbstractBean<T,Class<T>>
-
registerInterceptors
protected void registerInterceptors()
-
-