public class GenericScope extends Object implements org.springframework.beans.factory.config.Scope, org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.beans.factory.DisposableBean
A generic Scope implementation.
Modifier and Type | Field and Description |
---|---|
static String |
SCOPED_TARGET_PREFIX |
Constructor and Description |
---|
GenericScope() |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
protected boolean |
destroy(String name)
Destroy the named bean (i.e.
|
Object |
get(String name,
org.springframework.beans.factory.ObjectFactory<?> objectFactory) |
String |
getConversationId() |
Map<String,Exception> |
getErrors()
A map of bean name to errors when instantiating the bean.
|
protected String |
getName() |
void |
postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) |
void |
registerDestructionCallback(String name,
Runnable callback) |
Object |
remove(String name) |
Object |
resolveContextualObject(String key) |
void |
setBeanLifecycleManager(BeanLifecycleDecorator<?> lifecycle)
Helper to manage the creation and destruction of beans.
|
void |
setId(String id)
Manual override for the serialization id that will be used to identify the bean
factory.
|
void |
setName(String name)
The name of this scope.
|
void |
setProxyTargetClass(boolean proxyTargetClass)
Flag to indicate that proxies should be created for the concrete type, not just the
interfaces, of the scoped beans.
|
void |
setScopeCache(ScopeCache cache)
The cache implementation to use for bean instances in this scope.
|
public static final String SCOPED_TARGET_PREFIX
public void setId(String id)
id
- the id to setpublic void setName(String name)
name
- the name value to setpublic void setProxyTargetClass(boolean proxyTargetClass)
proxyTargetClass
- the flag value to setpublic void setScopeCache(ScopeCache cache)
cache
- the cache to usepublic void setBeanLifecycleManager(BeanLifecycleDecorator<?> lifecycle)
lifecycle
- the bean lifecycle to setpublic Map<String,Exception> getErrors()
public void destroy()
destroy
in interface org.springframework.beans.factory.DisposableBean
protected boolean destroy(String name)
name
- the bean name to flushpublic Object get(String name, org.springframework.beans.factory.ObjectFactory<?> objectFactory)
get
in interface org.springframework.beans.factory.config.Scope
public String getConversationId()
getConversationId
in interface org.springframework.beans.factory.config.Scope
public void registerDestructionCallback(String name, Runnable callback)
registerDestructionCallback
in interface org.springframework.beans.factory.config.Scope
public Object remove(String name)
remove
in interface org.springframework.beans.factory.config.Scope
public Object resolveContextualObject(String key)
resolveContextualObject
in interface org.springframework.beans.factory.config.Scope
public void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) throws org.springframework.beans.BeansException
postProcessBeanFactory
in interface org.springframework.beans.factory.config.BeanFactoryPostProcessor
org.springframework.beans.BeansException
protected String getName()
Copyright © 2016 Pivotal Software, Inc.. All rights reserved.