Class StepFactoryBean<I,​O>

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.FactoryBean<Step>

    public class StepFactoryBean<I,​O>
    extends StepParserStepFactoryBean<I,​O>
    This FactoryBean is used by the JSR-352 namespace parser to create Step objects. It stores all of the properties that are configurable on the <step/>.
    Since:
    3.0
    Author:
    Michael Minella, Chris Schaefer
    • Constructor Detail

      • StepFactoryBean

        public StepFactoryBean()
    • Method Detail

      • setPartitionReducer

        public void setPartitionReducer​(javax.batch.api.partition.PartitionReducer reducer)
      • setPartitions

        public void setPartitions​(int partitions)
      • getObject

        public Step getObject()
                       throws java.lang.Exception
        Create a Step from the configuration provided.
        Specified by:
        getObject in interface org.springframework.beans.factory.FactoryBean<I>
        Overrides:
        getObject in class StepParserStepFactoryBean<I,​O>
        Throws:
        java.lang.Exception
        See Also:
        FactoryBean.getObject()
      • setStepTasklet

        public void setStepTasklet​(java.lang.Object tasklet)
        Wraps a Batchlet in a BatchletAdapter if required for consumption by the rest of the framework.
        Parameters:
        tasklet - Tasklet or Batchlet implementation
        Throws:
        java.lang.IllegalArgumentException - if tasklet does not implement either Tasklet or Batchlet
      • setStepItemReader

        public void setStepItemReader​(java.lang.Object itemReader)
        Wraps a ItemReader in a ItemReaderAdapter if required for consumption by the rest of the framework.
        Parameters:
        itemReader - ItemReader or ItemReader implementation
        Throws:
        java.lang.IllegalArgumentException - if itemReader does not implement either version of ItemReader
      • setStepItemProcessor

        public void setStepItemProcessor​(java.lang.Object itemProcessor)
        Wraps a ItemProcessor in a ItemProcessorAdapter if required for consumption by the rest of the framework.
        Parameters:
        itemProcessor - ItemProcessor or ItemProcessor implementation
        Throws:
        java.lang.IllegalArgumentException - if itemProcessor does not implement either version of ItemProcessor
      • setStepItemWriter

        public void setStepItemWriter​(java.lang.Object itemWriter)
        Wraps a ItemWriter in a ItemWriterAdapter if required for consumption by the rest of the framework.
        Parameters:
        itemWriter - ItemWriter or ItemWriter implementation
        Throws:
        java.lang.IllegalArgumentException - if itemWriter does not implement either version of ItemWriter
      • setStepChunkCompletionPolicy

        public void setStepChunkCompletionPolicy​(java.lang.Object chunkCompletionPolicy)
        Wraps a CheckpointAlgorithm in a CheckpointAlgorithmAdapter if required for consumption by the rest of the framework.
        Parameters:
        chunkCompletionPolicy - CompletionPolicy or CheckpointAlgorithm implementation
        Throws:
        java.lang.IllegalArgumentException - if chunkCompletionPolicy does not implement either CompletionPolicy or CheckpointAlgorithm
      • setTimeout

        public void setTimeout​(java.lang.Integer timeout)