public abstract class AbstractOwbBean<T> extends BeanAttributesImpl<T> implements OwbBean<T>, javax.enterprise.inject.spi.PassivationCapable
OwbBean
contract.Bean
Modifier and Type | Field and Description |
---|---|
protected boolean |
enabled
This bean is enabled or disabled
|
protected Logger |
logger
Logger instance
|
protected String |
passivatingId
This string will be used for passivating the Bean.
|
protected boolean |
specializedBean
This bean is specialized or not
|
protected WebBeansContext |
webBeansContext |
protected WebBeansType |
webBeansType
Web Beans type
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractOwbBean(WebBeansContext webBeansContext,
WebBeansType webBeansType,
BeanAttributes<T> beanAttributes,
Class<?> beanClass,
boolean nullable) |
Modifier and Type | Method and Description |
---|---|
T |
create(javax.enterprise.context.spi.CreationalContext<T> creationalContext) |
void |
destroy(T instance,
javax.enterprise.context.spi.CreationalContext<T> creationalContext) |
Class<?> |
getBeanClass() |
String |
getId()
get the unique Id of the bean.
|
Set<javax.enterprise.inject.spi.InjectionPoint> |
getInjectionPoints() |
protected Logger |
getLogger()
The Logger should really only be used to log errors!
|
Class<T> |
getReturnType()
Gets type of the producer method/field or the bean class if it's not a producer.
|
WebBeansContext |
getWebBeansContext()
Get the web beans context this bean is associated with
|
WebBeansType |
getWebBeansType()
Get web bean type of the bean.
|
boolean |
isAlternative() |
boolean |
isDependent()
This determines if this bean is really a dependent bean,
and as such always creats a freshl instance for each
InjectionPoint.
|
boolean |
isEnabled()
Bean is enabled or not.
|
boolean |
isPassivationCapable()
True if passivation capable false otherwise.
|
boolean |
isSpecializedBean()
Returns true if bean is a specialized bean, false otherwise.
|
void |
setEnabled(boolean enabled)
Set enableed flag.
|
void |
setSpecializedBean(boolean specialized)
Set specialized flag.
|
String |
toString() |
getName, getQualifiers, getScope, getStereotypes, getTypes, isNullable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getProducer
protected Logger logger
protected WebBeansType webBeansType
protected boolean specializedBean
protected boolean enabled
protected String passivatingId
getId()
protected final WebBeansContext webBeansContext
protected AbstractOwbBean(WebBeansContext webBeansContext, WebBeansType webBeansType, BeanAttributes<T> beanAttributes, Class<?> beanClass, boolean nullable)
public WebBeansContext getWebBeansContext()
getWebBeansContext
in interface OwbBean<T>
public Class<?> getBeanClass()
getBeanClass
in interface javax.enterprise.inject.spi.Bean<T>
public T create(javax.enterprise.context.spi.CreationalContext<T> creationalContext)
create
in interface javax.enterprise.context.spi.Contextual<T>
public void destroy(T instance, javax.enterprise.context.spi.CreationalContext<T> creationalContext)
destroy
in interface javax.enterprise.context.spi.Contextual<T>
public String getId()
public boolean isPassivationCapable()
OwbBean
isPassivationCapable
in interface OwbBean<T>
public WebBeansType getWebBeansType()
getWebBeansType
in interface OwbBean<T>
WebBeansType
public Class<T> getReturnType()
getReturnType
in interface OwbBean<T>
getBeanClass()
public Set<javax.enterprise.inject.spi.InjectionPoint> getInjectionPoints()
getInjectionPoints
in interface javax.enterprise.inject.spi.Bean<T>
public void setSpecializedBean(boolean specialized)
setSpecializedBean
in interface OwbBean<T>
specialized
- flagpublic void setEnabled(boolean enabled)
setEnabled
in interface OwbBean<T>
enabled
- flagpublic boolean isSpecializedBean()
isSpecializedBean
in interface OwbBean<T>
public boolean isAlternative()
isAlternative
in interface BeanAttributes<T>
isAlternative
in class BeanAttributesImpl<T>
public boolean isEnabled()
protected Logger getLogger()
public boolean isDependent()
OwbBean
isDependent
in interface OwbBean<T>
true
if this is a dependent beanCopyright © 2008–2016 The Apache Software Foundation. All rights reserved.