类 JsrJobContextFactoryBean

  • 所有已实现的接口:
    org.springframework.beans.factory.FactoryBean<javax.batch.runtime.context.JobContext>

    public class JsrJobContextFactoryBean
    extends java.lang.Object
    implements org.springframework.beans.factory.FactoryBean<javax.batch.runtime.context.JobContext>
    Provides a single JobContext for each thread in a running job. Subsequent calls to FactoryBean.getObject() on the same thread will return the same instance. The JobContext wraps a JobExecution which is obtained in one of two ways:
    从以下版本开始:
    3.0
    作者:
    Michael Minella
    • 方法详细资料

      • getObject

        public javax.batch.runtime.context.JobContext getObject()
                                                         throws java.lang.Exception
        指定者:
        getObject 在接口中 org.springframework.beans.factory.FactoryBean<javax.batch.runtime.context.JobContext>
        抛出:
        java.lang.Exception
      • getObjectType

        public java.lang.Class<?> getObjectType()
        指定者:
        getObjectType 在接口中 org.springframework.beans.factory.FactoryBean<javax.batch.runtime.context.JobContext>
      • isSingleton

        public boolean isSingleton()
        指定者:
        isSingleton 在接口中 org.springframework.beans.factory.FactoryBean<javax.batch.runtime.context.JobContext>
      • setJobExecution

        public void setJobExecution​(JobExecution jobExecution)
        Used to provide JobContext instances to batch artifacts that are not within the scope of a given step.
        参数:
        jobExecution - set the current JobExecution
      • close

        public void close()
        Used to remove the JobContext for the current thread. Not used via normal processing but useful for testing.