com.caucho.config.inject
Class ManagedSingletonBean<T>

java.lang.Object
  extended by com.caucho.config.inject.AbstractBean<T>
      extended by com.caucho.config.inject.BeanAdapter<T,T>
          extended by com.caucho.config.inject.BeanWrapper<T>
              extended by com.caucho.config.inject.AbstractSingletonBean<T>
                  extended by com.caucho.config.inject.ManagedSingletonBean<T>
All Implemented Interfaces:
AnnotatedBean, ObjectProxy, java.io.Closeable, Contextual<T>, Bean<T>, PassivationCapable

public class ManagedSingletonBean<T>
extends AbstractSingletonBean<T>
implements java.io.Closeable

SingletonBean represents a singleton instance exported as a web beans.


Method Summary
 T create(CreationalContext<T> cxt)
          Creates a new instance for the Contextual's type.
 
Methods inherited from class com.caucho.config.inject.AbstractSingletonBean
close, getAnnotated, getAnnotatedType, getId, getName, getQualifiers, getScope, getStereotypes, getTypes, introspectProduces
 
Methods inherited from class com.caucho.config.inject.BeanWrapper
destroy
 
Methods inherited from class com.caucho.config.inject.BeanAdapter
getBean, getBeanClass, getInjectionPoints, isAlternative, isNullable
 
Methods inherited from class com.caucho.config.inject.AbstractBean
calculatePassivationId, createObject, getBeanManager, getInjectionTarget, getJavaClass, introspect, isPassivationCapable, toDisplayString, toDisplayStringImpl, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.io.Closeable
close
 

Method Detail

create

public T create(CreationalContext<T> cxt)
Description copied from interface: Contextual
Creates a new instance for the Contextual's type. If the instance already exists in the CreationalContext, create will return it instead of creating a new instance.
  1. create an instance of the bean
  2. create interceptor and decorator stacks
  3. inject dependencies
  4. set any XML-configured values
  5. call @PostConstruct

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