org.apache.webbeans.component
Class BuildInOwbBean<T>

java.lang.Object
  extended by org.apache.webbeans.component.AbstractOwbBean<T>
      extended by org.apache.webbeans.component.BuildInOwbBean<T>
Type Parameters:
T -
All Implemented Interfaces:
javax.enterprise.context.spi.Contextual<T>, javax.enterprise.inject.spi.Bean<T>, OwbBean<T>

public abstract class BuildInOwbBean<T>
extends AbstractOwbBean<T>

Following 3 options are provided for vendor's build-in beans implementation: 1. "none", means the build-in bean does not need a proxy wrapper. 2. "default", means the build-in bean needs OWB-provided default proxy wrapper. 3. A class name, which implements MethodHandler. This will allow vendor to customize the serialization behavior. The default values for 4 build-in beans are "default". Following property could be used to change the default behavior: Property Name: org.apache.webbeans.component.BuildInOwbBean.property Sample values: UserTransation:none;Principal:default;Validation:com.mycompany.ValidationProxyHandler;ValidationFactory:default

Author:
yingwang

Nested Class Summary
static class BuildInOwbBean.BuildInBeanMethodHandler<T>
          The default build in bean handler.
 
Field Summary
static String BUILD_IN_BEAN_PROPERTY
           
protected  Class handlerClass
          The handler class.
protected  String handlerClassName
          The handler class name.
protected  Constructor handlerContructor
           
 
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
protected BuildInOwbBean(WebBeansType webBeanType)
           
protected BuildInOwbBean(WebBeansType webBeansType, Class<T> returnType)
           
 
Method Summary
protected abstract  T createActualInstance(javax.enterprise.context.spi.CreationalContext<T> creationalContext)
           
protected  T createProxyWrapper(T actualInstance, javax.enterprise.context.spi.CreationalContext<T> creationalContext)
          Create a dependent proxy wrapper around the actual build in bean instance.
protected  boolean initBuildInBeanConfig(WebBeansContext webBeansContext)
          Parse the custom property.
 
Methods inherited from class org.apache.webbeans.component.AbstractOwbBean
addApiType, addInjectionPoint, addQualifier, addStereoType, create, createInstance, createNewInstance, destroy, destroyCreatedInstance, destroyInstance, equals, getBeanClass, getId, getImplQualifiers, getImplScopeType, getInjectionPoint, getInjectionPoints, getLogger, getManager, getName, getOwbStereotypes, getQualifiers, getReturnType, getScope, getStereotypes, getTypes, getWebBeansContext, getWebBeansType, hashCode, isAlternative, isDependent, isEnabled, isNullable, isPassivationCapable, isSerializable, isSpecializedBean, setEnabled, setImplScopeType, setName, setNullable, setSerializable, setSpecializedBean, toString, validatePassivationDependencies
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

BUILD_IN_BEAN_PROPERTY

public static final String BUILD_IN_BEAN_PROPERTY
See Also:
Constant Field Values

handlerClassName

protected String handlerClassName
The handler class name.


handlerClass

protected Class handlerClass
The handler class.


handlerContructor

protected Constructor handlerContructor
Constructor Detail

BuildInOwbBean

protected BuildInOwbBean(WebBeansType webBeanType)

BuildInOwbBean

protected BuildInOwbBean(WebBeansType webBeansType,
                         Class<T> returnType)
Method Detail

initBuildInBeanConfig

protected boolean initBuildInBeanConfig(WebBeansContext webBeansContext)
Parse the custom property.

Returns:
true

createProxyWrapper

protected T createProxyWrapper(T actualInstance,
                               javax.enterprise.context.spi.CreationalContext<T> creationalContext)
Create a dependent proxy wrapper around the actual build in bean instance.

Parameters:
actualInstance -
creationalContext -
Returns:

createActualInstance

protected abstract T createActualInstance(javax.enterprise.context.spi.CreationalContext<T> creationalContext)


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