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:
javax.enterprise.context.spi.Contextual<X>, javax.enterprise.inject.spi.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, 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(javax.enterprise.context.spi.CreationalContext<X> creationalContext)
          Creates the instance of the bean that has a specific implementation type.
 X getActualInstance()
          Called after deserialization to get a new instance for some type of resource bean instance that are not serializable.
 boolean isPassivationCapable()
          True if passivation capable false otherwise.
 
Methods inherited from class org.apache.webbeans.component.ProducerFieldBean
checkNullInstance, checkScopeType, createDefaultInstance, getActualTypeArguments, getCreatorField, getId, setProducerField, toString
 
Methods inherited from class org.apache.webbeans.component.AbstractProducerBean
destroyBean, destroyInstance, dispose, getInjectionPoints, getParent, getParentInstance, getParentInstanceFromContext, isPassivationCapable, validatePassivationDependencies
 
Methods inherited from class org.apache.webbeans.component.AbstractOwbBean
addApiType, addInjectionPoint, addQualifier, addStereoType, create, createNewInstance, destroy, destroyCreatedInstance, equals, getBeanClass, getImplQualifiers, getImplScopeType, getInjectionPoint, getLogger, getManager, getName, getOwbStereotypes, getQualifiers, getReturnType, getScope, getStereotypes, getTypes, getWebBeansContext, getWebBeansType, hashCode, isAlternative, isDependent, isEnabled, isNullable, isSerializable, isSpecializedBean, setEnabled, setImplScopeType, setName, setNullable, setSerializable, setSpecializedBean
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, 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(javax.enterprise.context.spi.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

getActualInstance

public X getActualInstance()
Called after deserialization to get a new instance for some type of resource bean instance that are not serializable.

Returns:
a new instance of this resource bean.

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-2012 The Apache Software Foundation. All Rights Reserved.