org.apache.webbeans.component
Interface OwbBean<T>

All Superinterfaces:
javax.enterprise.inject.spi.Bean<T>, javax.enterprise.context.spi.Contextual<T>
All Known Subinterfaces:
InjectionTargetBean<T>
All Known Implementing Classes:
AbstractInjectionTargetBean, AbstractOwbBean, AbstractProducerBean, BeanManagerBean, BuildInOwbBean, ConversationBean, CustomInterceptor, EventBean, ExtensionBean, InjectionPointBean, InstanceBean, ManagedBean, NewManagedBean, ProducerFieldBean, ProducerMethodBean, ResourceBean, ThirdpartyBeanImpl, WebBeansDecorator, WebBeansInterceptor

public interface OwbBean<T>
extends javax.enterprise.inject.spi.Bean<T>

OWB specific extension of the Bean interface. It is used internally. Do not use it. Instead use AbstractOwbBean for extension.

Version:
$Rev: 1057448 $ $Date: 2011-01-11 03:10:20 +0100 (Di, 11 Jan 2011) $ bean class

Method Summary
 void addApiType(Class<?> apiType)
          Adds new api type.
 void addInjectionPoint(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
          Adds new injection point.
 void addQualifier(Annotation qualifier)
          Adds qualifier.
 void addStereoType(Annotation stereoType)
          Adds new stereotype annotation.
 T createNewInstance(javax.enterprise.context.spi.CreationalContext<T> creationalContext)
          Create an instance.
 void destroyCreatedInstance(T instance, javax.enterprise.context.spi.CreationalContext<T> creationalContext)
          Destroys instance.
 String getId()
          Gets id of the bean.
 Set<Annotation> getImplQualifiers()
          Returns set of qualifier annotations.
 Annotation getImplScopeType()
          Returns scope type annotation.
 List<javax.enterprise.inject.spi.InjectionPoint> getInjectionPoint(Member member)
          Gets injection points for given member.
 Set<Annotation> getOwbStereotypes()
          Gets stereotypes annotations.
 Class<T> getReturnType()
          Returns bean class type
 WebBeansContext getWebBeansContext()
           
 WebBeansType getWebBeansType()
          Returns bean type.
 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 isSerializable()
          Returns true if bean is capable of serializable, false otherwise.
 boolean isSpecializedBean()
          Returns true if bean is a specialized bean, false otherwise.
 void setEnabled(boolean enabled)
          Set enableed flag.
 void setImplScopeType(Annotation scopeType)
          Sets bean scope type annotation.
 void setName(String name)
          Sets name of the bean.
 void setNullable(boolean nullable)
          Set nullable flag.
 void setSerializable(boolean serializable)
          Sets serializable flag.
 void setSpecializedBean(boolean specialized)
          Set specialized flag.
 void validatePassivationDependencies()
          If bean is passivation capable, it validate all of its dependencies.
 
Methods inherited from interface javax.enterprise.inject.spi.Bean
getBeanClass, getInjectionPoints, getName, getQualifiers, getScope, getStereotypes, getTypes, isAlternative, isNullable
 
Methods inherited from interface javax.enterprise.context.spi.Contextual
create, destroy
 

Method Detail

getImplScopeType

Annotation getImplScopeType()
Returns scope type annotation.

Returns:
scope type annotation

setImplScopeType

void setImplScopeType(Annotation scopeType)
Sets bean scope type annotation.

Parameters:
scopeType - bean scope type annotation

getWebBeansType

WebBeansType getWebBeansType()
Returns bean type.

Returns:
webbeans type
See Also:
WebBeansType

createNewInstance

T createNewInstance(javax.enterprise.context.spi.CreationalContext<T> creationalContext)
Create an instance.

Parameters:
creationalContext - creaitonal context
Returns:
instance

destroyCreatedInstance

void destroyCreatedInstance(T instance,
                            javax.enterprise.context.spi.CreationalContext<T> creationalContext)
Destroys instance.

Parameters:
instance - instance
creationalContext - creational

addQualifier

void addQualifier(Annotation qualifier)
Adds qualifier.

Parameters:
qualifier - bean qualifier

isSerializable

boolean isSerializable()
Returns true if bean is capable of serializable, false otherwise.

Returns:
true if bean is serializable

addStereoType

void addStereoType(Annotation stereoType)
Adds new stereotype annotation.

Parameters:
stereoType - stereotype annotation

addApiType

void addApiType(Class<?> apiType)
Adds new api type.

Parameters:
apiType - api type

addInjectionPoint

void addInjectionPoint(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
Adds new injection point.

Parameters:
injectionPoint - injection point

getImplQualifiers

Set<Annotation> getImplQualifiers()
Returns set of qualifier annotations.

Returns:
set of qualifier annotations

getOwbStereotypes

Set<Annotation> getOwbStereotypes()
Gets stereotypes annotations.


setName

void setName(String name)
Sets name of the bean.

Parameters:
name - bean name

getInjectionPoint

List<javax.enterprise.inject.spi.InjectionPoint> getInjectionPoint(Member member)
Gets injection points for given member.

For example, if member is field, it gets all injected field's injection points of bean.

Parameters:
member - java member
Returns:
injection points for given member

getReturnType

Class<T> getReturnType()
Returns bean class type

Returns:
bean class type

setSerializable

void setSerializable(boolean serializable)
Sets serializable flag.

Parameters:
serializable - flag

setNullable

void setNullable(boolean nullable)
Set nullable flag.

Parameters:
nullable - flag

setSpecializedBean

void setSpecializedBean(boolean specialized)
Set specialized flag.

Parameters:
specialized - flag

isSpecializedBean

boolean isSpecializedBean()
Returns true if bean is a specialized bean, false otherwise.

Returns:
true if bean is a specialized bean

setEnabled

void setEnabled(boolean enabled)
Set enableed flag.

Parameters:
enabled - flag

isEnabled

boolean isEnabled()
Bean is enabled or not.

Returns:
true if enabled

getId

String getId()
Gets id of the bean.

Returns:
id of the bean

isPassivationCapable

boolean isPassivationCapable()
True if passivation capable false otherwise.

Returns:
true if this bean is passivation capable

isDependent

boolean isDependent()
This determines if this bean is really a dependent bean, and as such always creats a freshl instance for each InjectionPoint. A BeanManagerBean is e.g. not a dependent bean.

Returns:
true if this is a dependent bean

validatePassivationDependencies

void validatePassivationDependencies()
If bean is passivation capable, it validate all of its dependencies.

Throws:
WebBeansConfigurationException - if not satisfy passivation dependencies

getWebBeansContext

WebBeansContext getWebBeansContext()


Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.