类 BatchScopeSupport

  • 所有已实现的接口:
    org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.beans.factory.config.Scope, org.springframework.core.Ordered
    直接已知子类:
    JobScope, StepScope

    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.
    • 字段概要

      • 从接口继承的字段 org.springframework.core.Ordered

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • 方法概要

      所有方法 静态方法 实例方法 抽象方法 具体方法 
      修饰符和类型方法说明
      protected static org.springframework.beans.factory.config.BeanDefinitionHoldercreateScopedProxy​(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.StringgetName() 
      intgetOrder() 
      abstract java.lang.StringgetTargetNamePrefix() 
      voidpostProcessBeanFactory​(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
      Register this scope with the enclosing BeanFactory.
      voidsetAutoProxy​(boolean autoProxy)
      Flag to indicate that bean definitions need not be auto proxied.
      voidsetName​(java.lang.String name)
      Public setter for the name property.
      voidsetOrder​(int order) 
      voidsetProxyTargetClass​(boolean proxyTargetClass)
      Flag to indicate that proxies should use dynamic subclassing.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • 从接口继承的方法 org.springframework.beans.factory.config.Scope

        get, getConversationId, registerDestructionCallback, remove, resolveContextualObject
    • 方法详细资料

      • setOrder

        public void setOrder​(int order)
        参数:
        order - the order value to set priority of callback execution for the BeanFactoryPostProcessor 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)
      • 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 the StepContext is available. Amounts to adding <aop-auto-proxy/> to a step scoped bean.
        参数:
        beanName - the bean name to replace
        definition - the bean definition to replace
        registry - the enclosing BeanDefinitionRegistry
        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.