类 BatchScopeSupport
- java.lang.Object
- org.springframework.batch.core.scope.BatchScopeSupport
- 所有已实现的接口:
org.springframework.beans.factory.config.BeanFactoryPostProcessor
,org.springframework.beans.factory.config.Scope
,org.springframework.core.Ordered
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
ScopeSupport.- 从以下版本开始:
- 3.0
- 作者:
- Michael Minella
嵌套类概要
嵌套类 修饰符和类型 类 说明 protected static class
BatchScopeSupport.Scopifier
Helper class to scan a bean definition hierarchy and force the use of auto-proxy for step scoped beans.
构造器概要
构造器 构造器 说明 BatchScopeSupport()
方法概要
所有方法 静态方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 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 theStepContext
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.
构造器详细资料
BatchScopeSupport
public BatchScopeSupport()
方法详细资料
setOrder
public void setOrder(int order)
- 参数:
order
- the order value to set priority of callback execution for theBeanFactoryPostProcessor
part of this scope bean.
getOrder
public int getOrder()
- 指定者:
getOrder
在接口中org.springframework.core.Ordered
getName
public java.lang.String getName()
setName
public void setName(java.lang.String name)
Public setter for the name property. This can then be used as a bean definition attribute, e.g. scope="job".- 参数:
name
- the name to set for this scope.
setProxyTargetClass
public void setProxyTargetClass(boolean proxyTargetClass)
Flag to indicate that proxies should use dynamic subclassing. This allows classes with no interface to be proxied. Defaults to false.- 参数:
proxyTargetClass
- set to true to have proxies created using dynamic subclasses
setAutoProxy
public void setAutoProxy(boolean autoProxy)
Flag to indicate that bean definitions need not be auto proxied. This gives control back to the declarer of the bean definition (e.g. in an @Configuration class).- 参数:
autoProxy
- the flag value to set (default true)
getTargetNamePrefix
public abstract java.lang.String getTargetNamePrefix()
postProcessBeanFactory
public void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) throws org.springframework.beans.BeansException
Register this scope with the enclosing BeanFactory.- 指定者:
postProcessBeanFactory
在接口中org.springframework.beans.factory.config.BeanFactoryPostProcessor
- 参数:
beanFactory
- the BeanFactory to register with- 抛出:
org.springframework.beans.BeansException
- if there is a problem.- 另请参阅:
BeanFactoryPostProcessor.postProcessBeanFactory(ConfigurableListableBeanFactory)
createScopedProxy
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 theStepContext
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 enclosingBeanDefinitionRegistry
proxyTargetClass
- true if we need to force use of dynamic subclasses- 返回:
- a
BeanDefinitionHolder
for the new representation of the target. Caller should register it if needed to be visible at top level in bean factory.