org.apache.webbeans.component
Class ResourceBean<X,T extends Annotation>

java.lang.Object
  extended by org.apache.webbeans.component.AbstractOwbBean<T>
      extended by org.apache.webbeans.component.AbstractProducerBean<T>
          extended by org.apache.webbeans.component.ProducerFieldBean<X>
              extended by org.apache.webbeans.component.ResourceBean<X,T>
All Implemented Interfaces:
Contextual<X>, Bean<X>, IBeanHasParent<X>, OwbBean<X>

public class ResourceBean<X,T extends Annotation>
extends ProducerFieldBean<X>


Field Summary
 
Fields inherited from class org.apache.webbeans.component.AbstractProducerBean
ownerComponent
 
Fields inherited from class org.apache.webbeans.component.AbstractOwbBean
apiTypes, enabled, implQualifiers, implScopeType, injectionPoints, logger, name, nullable, passivatingId, returnType, scopeClass, serializable, specializedBean, stereoTypeClasses, stereoTypes, webBeansType
 
Constructor Summary
ResourceBean(Class<X> returnType, InjectionTargetBean<?> ownerBean, ResourceReference<X,T> resourceReference)
           
 
Method Summary
protected  X createInstance(CreationalContext<X> creationalContext)
          Creates the instance of the bean that has a specific implementation type.
protected  void destroyInstance(X instance, CreationalContext<X> creationalContext)
          Destroy the instance of the bean.
 boolean isPassivationCapable()
          True if passivation capable false otherwise.
 
Methods inherited from class org.apache.webbeans.component.ProducerFieldBean
checkNullInstance, checkScopeType, createDefaultInstance, getActualTypeArguments, getCreatorField, setProducerField, toString
 
Methods inherited from class org.apache.webbeans.component.AbstractProducerBean
destroyBean, dispose, getInjectionPoints, getParent, getParentInstance, getParentInstanceFromContext, isPassivationCapable
 
Methods inherited from class org.apache.webbeans.component.AbstractOwbBean
addApiType, addInjectionPoint, addQualifier, addStereoType, create, createNewInstance, destroy, destroyCreatedInstance, getBeanClass, getId, getImplQualifiers, getImplScopeType, getInjectionPoint, getLogger, getManager, getName, getOwbStereotypes, getQualifiers, getReturnType, getScope, getStereotypes, getTypes, getWebBeansType, isAlternative, isDependent, isEnabled, isNullable, isSerializable, isSpecializedBean, setEnabled, setImplScopeType, setName, setNullable, setSerializable, setSpecializedBean, validatePassivationDependencies
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.webbeans.component.IBeanHasParent
dispose, getParent
 

Constructor Detail

ResourceBean

public ResourceBean(Class<X> returnType,
                    InjectionTargetBean<?> ownerBean,
                    ResourceReference<X,T> resourceReference)
Method Detail

createInstance

protected X createInstance(CreationalContext<X> creationalContext)
Description copied from class: ProducerFieldBean
Creates the instance of the bean that has a specific implementation type. Each subclass must define its own create mechanism.

Overrides:
createInstance in class ProducerFieldBean<X>
Parameters:
creationalContext - the contextual instance shall be created in
Returns:
instance of the bean

destroyInstance

protected void destroyInstance(X instance,
                               CreationalContext<X> creationalContext)
Description copied from class: AbstractProducerBean
Destroy the instance of the bean. Each subclass must define its own destroy mechanism.

Overrides:
destroyInstance in class AbstractProducerBean<X>
Parameters:
instance - instance of the bean that is being destroyed
creationalContext - the contextual instance has been created in

isPassivationCapable

public boolean isPassivationCapable()
Description copied from interface: OwbBean
True if passivation capable false otherwise.

Specified by:
isPassivationCapable in interface OwbBean<X>
Overrides:
isPassivationCapable in class ProducerFieldBean<X>
Returns:
true if this bean is passivation capable


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