|
JSF-Spring | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry
org.springframework.beans.factory.support.AbstractBeanFactory
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
org.springframework.beans.factory.support.DefaultListableBeanFactory
de.mindmatters.faces.spring.factory.ManagedBeanFactory
public class ManagedBeanFactory
Default implementation of the ConfigurableBeanFactory interfaces: a full-fledged bean factory based on bean definitions.
This factory based on different types of bean definitions. In addition to the
default types of bean definitions this factory is able to handle
ManagedBeanDefinitions.
Based on
DefaultListableBeanFactory
| Field Summary | |
|---|---|
static java.lang.String |
SCOPE_APPLICATION
Scope identifier for application scope: "application". |
static java.lang.String |
SCOPE_NONE
Scope identifier for none scope: "none". |
| Fields inherited from class org.springframework.beans.factory.support.DefaultSingletonBeanRegistry |
|---|
logger |
| Fields inherited from interface org.springframework.beans.factory.config.AutowireCapableBeanFactory |
|---|
AUTOWIRE_AUTODETECT, AUTOWIRE_BY_NAME, AUTOWIRE_BY_TYPE, AUTOWIRE_CONSTRUCTOR, AUTOWIRE_NO |
| Fields inherited from interface org.springframework.beans.factory.config.ConfigurableBeanFactory |
|---|
SCOPE_PROTOTYPE, SCOPE_SINGLETON |
| Constructor Summary | |
|---|---|
ManagedBeanFactory()
Creates a new DefaultConfigurableBeanFactory. |
|
ManagedBeanFactory(BeanFactory parentBeanFactory)
Creates a new DefaultConfigurableBeanFactory with the given parent. |
|
| Method Summary | |
|---|---|
protected void |
addSingleton(java.lang.String beanName,
java.lang.Object sharedBean)
Add the given singleton object to the singleton cache of this factory. |
static RootBeanDefinition |
createManagedBeanDefinition(java.lang.String beanClassName,
java.lang.ClassLoader beanClassLoader)
Creates a ManagedBeanDefinition based upon a
RootBeanDefinition. |
static RootBeanDefinition |
createRootBeanDefinition(RootBeanDefinition beanDefinition)
Creates a RootBeanDefinition based upon a RootBeanDefinition. |
void |
destroySingletons()
Destroy all singleton beans in this factory, including inner beans that have been registered as disposable. |
protected java.lang.Object |
doTypeConversionIfNecessary(TypeConverter converter,
java.lang.Object value,
java.lang.Class targetType,
MethodParameter methodParam)
Convert the given value into the specified target type, using the specified BeanWrapper. |
protected RootBeanDefinition |
getMergedBeanDefinition(java.lang.String beanName,
BeanDefinition bd)
Return a RootBeanDefinition for the given bean name, by merging with the parent if the given original bean definition is a child bean definition. |
protected void |
removeSingleton(java.lang.String beanName)
Overridden to clear FactoryBean instance cache as well. |
| Methods inherited from class org.springframework.beans.factory.support.DefaultListableBeanFactory |
|---|
containsBeanDefinition, copyConfigurationFrom, findMatchingBeans, getBeanDefinition, getBeanDefinitionCount, getBeanDefinitionNames, getBeanNamesForType, getBeanNamesForType, getBeansOfType, getBeansOfType, preInstantiateSingletons, registerBeanDefinition, setAllowBeanDefinitionOverriding, setAllowEagerClassLoading, toString |
| Methods inherited from class org.springframework.beans.factory.support.DefaultSingletonBeanRegistry |
|---|
afterSingletonCreation, beforeSingletonCreation, containsSingleton, destroyBean, destroySingleton, getDependentBeans, getSingleton, getSingleton, getSingletonCount, getSingletonNames, hasDependentBean, isSingletonCurrentlyInCreation, registerDependentBean, registerDisposableBean, registerSingleton |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.springframework.beans.factory.config.ConfigurableListableBeanFactory |
|---|
ignoreDependencyInterface, ignoreDependencyType |
| Methods inherited from interface org.springframework.beans.factory.config.AutowireCapableBeanFactory |
|---|
applyBeanPostProcessorsAfterInitialization, applyBeanPostProcessorsBeforeInitialization, applyBeanPropertyValues, autowire, autowireBeanProperties, configureBean, createBean, initializeBean |
| Methods inherited from interface org.springframework.beans.factory.config.ConfigurableBeanFactory |
|---|
addBeanPostProcessor, addPropertyEditorRegistrar, destroyBean, destroyScopedBean, getBeanClassLoader, getBeanPostProcessorCount, getRegisteredScope, getRegisteredScopeNames, isCacheBeanMetadata, isCurrentlyInCreation, registerAlias, registerCustomEditor, registerScope, setBeanClassLoader, setCacheBeanMetadata, setParentBeanFactory |
| Methods inherited from interface org.springframework.beans.factory.HierarchicalBeanFactory |
|---|
containsLocalBean, getParentBeanFactory |
| Methods inherited from interface org.springframework.beans.factory.config.SingletonBeanRegistry |
|---|
containsSingleton, getSingleton, getSingletonCount, getSingletonNames, registerSingleton |
| Methods inherited from interface org.springframework.beans.factory.support.BeanDefinitionRegistry |
|---|
getAliases, registerAlias |
| Field Detail |
|---|
public static final java.lang.String SCOPE_APPLICATION
public static final java.lang.String SCOPE_NONE
| Constructor Detail |
|---|
public ManagedBeanFactory()
public ManagedBeanFactory(BeanFactory parentBeanFactory)
parentBeanFactory - the parent| Method Detail |
|---|
public static final RootBeanDefinition createManagedBeanDefinition(java.lang.String beanClassName,
java.lang.ClassLoader beanClassLoader)
throws java.lang.ClassNotFoundException
ManagedBeanDefinition based upon a
RootBeanDefinition.
beanClassName - the name of the bean class, if anybeanClassLoader - the ClassLoader to use for loading bean classes
java.lang.ClassNotFoundException - if the bean class could not be loadedManagedBeanDefinition,
RootBeanDefinitionpublic static final RootBeanDefinition createRootBeanDefinition(RootBeanDefinition beanDefinition)
RootBeanDefinition based upon a RootBeanDefinition. The
created bean definition treats faces beans defined in the application
scope as singleton beans.
beanDefinition - the original RootBeanDefinition
protected final java.lang.Object doTypeConversionIfNecessary(TypeConverter converter,
java.lang.Object value,
java.lang.Class targetType,
MethodParameter methodParam)
doTypeConversionIfNecessary in class AbstractBeanFactoryconverter - the TypeConverter to work onvalue - the original valuetargetType - the target type
BeanWrapperImpl.convertIfNecessary(Object, Class)
protected final RootBeanDefinition getMergedBeanDefinition(java.lang.String beanName,
BeanDefinition bd)
getMergedBeanDefinition in class AbstractBeanFactorybeanName - the name of the bean definitionbd - the original bean definition (Root/ChildBeanDefinition)
protected final void addSingleton(java.lang.String beanName,
java.lang.Object sharedBean)
To be called for eager registration of singletons, e.g. to be able to resolve circular references.
addSingleton in class DefaultSingletonBeanRegistrybeanName - the name of the beansharedBean - the singleton objectprotected final void removeSingleton(java.lang.String beanName)
removeSingleton in class AbstractAutowireCapableBeanFactorybeanName - the name of the beanpublic final void destroySingletons()
Any exception that arises during destruction should be caught and logged instead of propagated to the caller of this method.
destroySingletons in interface ConfigurableBeanFactorydestroySingletons in class DefaultSingletonBeanRegistry
|
JSF-Spring | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||