org.springframework.batch.core.step.item
Class SimpleStepFactoryBean

java.lang.Object
  extended by org.springframework.batch.core.step.item.AbstractStepFactoryBean
      extended by org.springframework.batch.core.step.item.SimpleStepFactoryBean
All Implemented Interfaces:
BeanNameAware, FactoryBean
Direct Known Subclasses:
SkipLimitStepFactoryBean

public class SimpleStepFactoryBean
extends AbstractStepFactoryBean

Most common configuration options for simple steps should be found here. Use this factory bean instead of creating a Step implementation manually. This factory does not support configuration of fault-tolerant behavior, use appropriate subclass of this factory bean to configure skip or retry.

Author:
Dave Syer
See Also:
SkipLimitStepFactoryBean, StatefulRetryStepFactoryBean

Constructor Summary
SimpleStepFactoryBean()
           
 
Method Summary
protected  void applyConfiguration(ItemOrientedStep step)
           
protected  RepeatTemplate getChunkOperations()
          Protected getter for the chunk operations to make them available in subclasses.
protected  ExceptionHandler getExceptionHandler()
          Protected getter for the ExceptionHandler.
protected  ItemHandler getItemHandler()
          Public getter for the ItemHandler.
protected  StepListener[] getListeners()
          Protected getter for the StepListeners.
protected  RepeatTemplate getStepOperations()
          Protected getter for the step operations to make them available in subclasses.
 void setCommitInterval(int commitInterval)
          Set the commit interval.
 void setExceptionHandler(ExceptionHandler exceptionHandler)
          Public setter for the SimpleLimitExceptionHandler.
protected  void setItemHandler(ItemHandler itemHandler)
          Public setter for the ItemHandler.
 void setListeners(StepListener[] listeners)
          The listeners to inject into the Step.
 void setStreams(ItemStream[] streams)
          The streams to inject into the Step.
 void setTaskExecutor(TaskExecutor taskExecutor)
          Public setter for the TaskExecutor.
 
Methods inherited from class org.springframework.batch.core.step.item.AbstractStepFactoryBean
getItemReader, getItemWriter, getName, getObject, getObjectType, isSingleton, setAllowStartIfComplete, setBeanName, setItemReader, setItemWriter, setJobRepository, setSingleton, setStartLimit, setTransactionManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleStepFactoryBean

public SimpleStepFactoryBean()
Method Detail

setCommitInterval

public void setCommitInterval(int commitInterval)
Set the commit interval.

Parameters:
commitInterval - 1 by default

setStreams

public void setStreams(ItemStream[] streams)
The streams to inject into the Step. Any instance of ItemStream can be used, and will then receive callbacks at the appropriate stage in the step.

Parameters:
streams - an array of listeners

setListeners

public void setListeners(StepListener[] listeners)
The listeners to inject into the Step. Any instance of StepListener can be used, and will then receive callbacks at the appropriate stage in the step.

Parameters:
listeners - an array of listeners

getListeners

protected StepListener[] getListeners()
Protected getter for the StepListeners.

Returns:
the listeners

getStepOperations

protected RepeatTemplate getStepOperations()
Protected getter for the step operations to make them available in subclasses.

Returns:
the step operations

getChunkOperations

protected RepeatTemplate getChunkOperations()
Protected getter for the chunk operations to make them available in subclasses.

Returns:
the step operations

setExceptionHandler

public void setExceptionHandler(ExceptionHandler exceptionHandler)
Public setter for the SimpleLimitExceptionHandler.

Parameters:
exceptionHandler - the exceptionHandler to set

getExceptionHandler

protected ExceptionHandler getExceptionHandler()
Protected getter for the ExceptionHandler.

Returns:
the ExceptionHandler

setTaskExecutor

public void setTaskExecutor(TaskExecutor taskExecutor)
Public setter for the TaskExecutor. If this is set, then it will be used to execute the chunk processing inside the Step.

Parameters:
taskExecutor - the taskExecutor to set

getItemHandler

protected ItemHandler getItemHandler()
Public getter for the ItemHandler.

Returns:
the ItemHandler

setItemHandler

protected void setItemHandler(ItemHandler itemHandler)
Public setter for the ItemHandler.

Parameters:
itemHandler - the ItemHandler to set

applyConfiguration

protected void applyConfiguration(ItemOrientedStep step)
Overrides:
applyConfiguration in class AbstractStepFactoryBean
Parameters:
step -


Copyright © 2008 SpringSource. All Rights Reserved.