public abstract class BatchScopeSupport
extends java.lang.Object
implements org.springframework.beans.factory.config.Scope, org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.core.Ordered
Modifier and Type | Class and Description |
---|---|
protected static class |
BatchScopeSupport.Scopifier
Helper class to scan a bean definition hierarchy and force the use of
auto-proxy for step scoped beans.
|
Constructor and Description |
---|
BatchScopeSupport() |
Modifier and Type | Method and Description |
---|---|
protected static org.springframework.beans.factory.config.BeanDefinitionHolder |
createScopedProxy(java.lang.String beanName,
org.springframework.beans.factory.config.BeanDefinition definition,
org.springframework.beans.factory.support.BeanDefinitionRegistry registry,
boolean proxyTargetClass)
Wrap a target bean definition in a proxy that defers initialization until
after the
StepContext is available. |
java.lang.String |
getName() |
int |
getOrder() |
abstract java.lang.String |
getTargetNamePrefix() |
void |
postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
Register this scope with the enclosing BeanFactory.
|
void |
setAutoProxy(boolean autoProxy)
Flag to indicate that bean definitions need not be auto proxied.
|
void |
setName(java.lang.String name)
Public setter for the name property.
|
void |
setOrder(int order) |
void |
setProxyTargetClass(boolean proxyTargetClass)
Flag to indicate that proxies should use dynamic subclassing.
|
public void setOrder(int order)
order
- the order value to set priority of callback execution for
the BeanFactoryPostProcessor
part of this scope bean.public int getOrder()
getOrder
in interface org.springframework.core.Ordered
public java.lang.String getName()
public void setName(java.lang.String name)
name
- the name to set for this scope.public void setProxyTargetClass(boolean proxyTargetClass)
proxyTargetClass
- set to true to have proxies created using dynamic
subclassespublic void setAutoProxy(boolean autoProxy)
autoProxy
- the flag value to set (default true)public abstract java.lang.String getTargetNamePrefix()
public void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) throws org.springframework.beans.BeansException
postProcessBeanFactory
in interface org.springframework.beans.factory.config.BeanFactoryPostProcessor
beanFactory
- the BeanFactory to register withorg.springframework.beans.BeansException
- if there is a problem.BeanFactoryPostProcessor.postProcessBeanFactory(ConfigurableListableBeanFactory)
protected static org.springframework.beans.factory.config.BeanDefinitionHolder createScopedProxy(java.lang.String beanName, org.springframework.beans.factory.config.BeanDefinition definition, org.springframework.beans.factory.support.BeanDefinitionRegistry registry, boolean proxyTargetClass)
StepContext
is available. Amounts to adding
<aop-auto-proxy/> to a step scoped bean.beanName
- the bean name to replacedefinition
- the bean definition to replaceregistry
- the enclosing BeanDefinitionRegistry
proxyTargetClass
- true if we need to force use of dynamic
subclassesBeanDefinitionHolder
for the new representation of the
target. Caller should register it if needed to be visible at top level in
bean factory.