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

java.lang.Object
  extended by org.apache.webbeans.component.BeanAttributesImpl<T>
      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>, javax.enterprise.inject.spi.BeanAttributes<X>, javax.enterprise.inject.spi.PassivationCapable, OwbBean<X>

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


Field Summary
 
Fields inherited from class org.apache.webbeans.component.AbstractOwbBean
enabled, isAlternative, logger, passivatingId, specializedBean, webBeansContext, webBeansType
 
Constructor Summary
ResourceBean(InjectionTargetBean<?> ownerComponent, ResourceReference<X,T> resourceReference, javax.enterprise.inject.spi.BeanAttributes<X> beanAttributes, Class<X> beanClass, javax.enterprise.inject.spi.ProducerFactory<X> producerFactory)
           
 
Method Summary
 X getActualInstance()
          Called after deserialization to get a new instance for some type of resource bean instance that are not serializable.
 ResourceReference<X,T> getReference()
           
 boolean isPassivationCapable()
          True if passivation capable false otherwise.
 
Methods inherited from class org.apache.webbeans.component.ProducerFieldBean
create, getCreatorField, getId, setProducerField
 
Methods inherited from class org.apache.webbeans.component.AbstractProducerBean
checkNullInstance, checkScopeType, dispose, getProducer, getReturnType, isPassivationCapable
 
Methods inherited from class org.apache.webbeans.component.AbstractOwbBean
destroy, equals, getBeanClass, getInjectionPoints, getLogger, getWebBeansContext, getWebBeansType, hashCode, isAlternative, isDependent, isEnabled, isSpecializedBean, providedId, setEnabled, setSpecializedBean, toString
 
Methods inherited from class org.apache.webbeans.component.BeanAttributesImpl
getName, getQualifiers, getScope, getStereotypes, getTypes, isNullable
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.enterprise.inject.spi.Bean
isNullable
 
Methods inherited from interface javax.enterprise.inject.spi.BeanAttributes
getName, getQualifiers, getScope, getStereotypes, getTypes
 

Constructor Detail

ResourceBean

public ResourceBean(InjectionTargetBean<?> ownerComponent,
                    ResourceReference<X,T> resourceReference,
                    javax.enterprise.inject.spi.BeanAttributes<X> beanAttributes,
                    Class<X> beanClass,
                    javax.enterprise.inject.spi.ProducerFactory<X> producerFactory)
Method Detail

getReference

public ResourceReference<X,T> getReference()

getActualInstance

public X getActualInstance()
Called after deserialization to get a new instance for some type of resource bean instance that are not serializable. TODO: broken if producer is wrapped but surely better than actually serializing

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–2015 The Apache Software Foundation. All rights reserved.