com.caucho.config.inject
Class ManagedBeanImpl<X>

java.lang.Object
  extended by com.caucho.config.inject.AbstractBean<T>
      extended by com.caucho.config.inject.AbstractIntrospectedBean<X>
          extended by com.caucho.config.inject.ManagedBeanImpl<X>
All Implemented Interfaces:
AnnotatedBean, PassivationSetter, ScheduleBean, ScopeAdapterBean<X>, ObjectProxy, Contextual<X>, Bean<X>, PassivationCapable
Direct Known Subclasses:
XmlManagedBeanImpl

@Module
public class ManagedBeanImpl<X>
extends AbstractIntrospectedBean<X>
implements ScopeAdapterBean<X>, ScheduleBean

SimpleBean represents a POJO Java bean registered as a WebBean.


Field Summary
 
Fields inherited from class com.caucho.config.inject.AbstractIntrospectedBean
CURRENT_ANN
 
Constructor Summary
ManagedBeanImpl(InjectManager injectManager, AnnotatedType<X> beanType, boolean isSessionBean)
           
ManagedBeanImpl(InjectManager webBeans, AnnotatedType<X> beanType, InjectionTarget<X> injectionTarget)
           
 
Method Summary
 X create(CreationalContext<X> context)
          Creates a new instance of the component.
 X createDependent(CreationalContext<X> env)
          Creates a new instance of the component.
 void destroy(X instance, CreationalContext<X> cxt)
          Call pre-destroy
 void dispose(X instance)
          Call post-construct
 AnnotatedType<X> getAnnotatedType()
           
 java.util.Set<InjectionPoint> getInjectionPoints()
          Returns the set of injection points, for validation.
 InjectionTarget<X> getInjectionTarget()
           
 java.util.Set<ObserverMethodImpl<X,?>> getObserverMethods()
          Returns the observer methods
 java.lang.Object getScopeAdapter()
           
 X getScopeAdapter(Bean<?> topBean, CreationalContextImpl<X> cxt)
           
 void introspect()
           
protected  void introspect(AnnotatedType<X> beanType)
          Called for implicit introspection.
 void introspectProduces()
           
protected  boolean isNormalScope()
           
protected  boolean isProxiedScope()
           
 void scheduleTimers(java.lang.Object value)
           
 void setInjectionTarget(InjectionTarget<X> target)
           
 boolean validate()
           
 
Methods inherited from class com.caucho.config.inject.AbstractIntrospectedBean
bind, getAnnotated, getBaseType, getBeanClass, getDefaultName, getId, getJavaClass, getName, getNamedValue, getQualifiers, getScope, getStereotypes, getTargetClass, getTargetName, getTargetSimpleName, getTargetType, getTypes, introspect, introspectDefault, introspectName, introspectQualifiers, introspectScope, introspectSpecializes, introspectStereotypes, isAlternative, isNullable, isPassivating, isPassivationCapable, setPassivating, setPassivationId, toDebugString
 
Methods inherited from class com.caucho.config.inject.AbstractBean
calculatePassivationId, createObject, getBeanManager, toDisplayString, toDisplayStringImpl, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ManagedBeanImpl

public ManagedBeanImpl(InjectManager injectManager,
                       AnnotatedType<X> beanType,
                       boolean isSessionBean)

ManagedBeanImpl

public ManagedBeanImpl(InjectManager webBeans,
                       AnnotatedType<X> beanType,
                       InjectionTarget<X> injectionTarget)
Method Detail

getAnnotatedType

public AnnotatedType<X> getAnnotatedType()
Overrides:
getAnnotatedType in class AbstractBean<X>

getInjectionTarget

public InjectionTarget<X> getInjectionTarget()
Overrides:
getInjectionTarget in class AbstractBean<X>

setInjectionTarget

public void setInjectionTarget(InjectionTarget<X> target)

isNormalScope

protected boolean isNormalScope()
Overrides:
isNormalScope in class AbstractIntrospectedBean<X>

create

public X create(CreationalContext<X> context)
Creates a new instance of the component.

Specified by:
create in interface Contextual<X>
Overrides:
create in class AbstractIntrospectedBean<X>
Parameters:
context - the creation context used to support circular references.
Returns:
the new instance

createDependent

public X createDependent(CreationalContext<X> env)
Creates a new instance of the component.


getScopeAdapter

public X getScopeAdapter(Bean<?> topBean,
                         CreationalContextImpl<X> cxt)
Specified by:
getScopeAdapter in interface ScopeAdapterBean<X>

isProxiedScope

protected boolean isProxiedScope()

getScopeAdapter

public java.lang.Object getScopeAdapter()

getInjectionPoints

public java.util.Set<InjectionPoint> getInjectionPoints()
Returns the set of injection points, for validation.

Specified by:
getInjectionPoints in interface Bean<X>
Overrides:
getInjectionPoints in class AbstractIntrospectedBean<X>

validate

public boolean validate()

getObserverMethods

public java.util.Set<ObserverMethodImpl<X,?>> getObserverMethods()
Returns the observer methods


dispose

public void dispose(X instance)
Call post-construct

Overrides:
dispose in class AbstractIntrospectedBean<X>

destroy

public void destroy(X instance,
                    CreationalContext<X> cxt)
Call pre-destroy

Specified by:
destroy in interface Contextual<X>
Overrides:
destroy in class AbstractIntrospectedBean<X>
Parameters:
instance - the instance to destroy

introspect

public void introspect()
Overrides:
introspect in class AbstractIntrospectedBean<X>

introspect

protected void introspect(AnnotatedType<X> beanType)
Called for implicit introspection.


introspectProduces

public void introspectProduces()

scheduleTimers

public void scheduleTimers(java.lang.Object value)
Specified by:
scheduleTimers in interface ScheduleBean