Class SummaryFooterCallback
- java.lang.Object
- org.springframework.batch.core.listener.StepExecutionListenerSupport
- org.springframework.batch.sample.support.SummaryFooterCallback
- All Implemented Interfaces:
StepExecutionListener,StepListener,FlatFileFooterCallback
public class SummaryFooterCallback extends StepExecutionListenerSupport implements FlatFileFooterCallback
Writes summary info in the footer of a file.
Constructor Summary
Constructors Constructor Description SummaryFooterCallback()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeforeStep(StepExecution stepExecution)Initialize the state of the listener with theStepExecutionfrom the current scope.voidwriteFooter(java.io.Writer writer)Write contents to a file using the suppliedWriter.Methods inherited from class org.springframework.batch.core.listener.StepExecutionListenerSupport
afterStep
Method Detail
writeFooter
public void writeFooter(java.io.Writer writer) throws java.io.IOExceptionDescription copied from interface:FlatFileFooterCallbackWrite contents to a file using the suppliedWriter. It is not required to flush the writer inside this method.- Specified by:
writeFooterin interfaceFlatFileFooterCallback- Parameters:
writer- theWriterto be used to write the footer.- Throws:
java.io.IOException- if error occurs during writing.
beforeStep
public void beforeStep(StepExecution stepExecution)
Description copied from interface:StepExecutionListenerInitialize the state of the listener with theStepExecutionfrom the current scope.- Specified by:
beforeStepin interfaceStepExecutionListener- Overrides:
beforeStepin classStepExecutionListenerSupport- Parameters:
stepExecution- instance ofStepExecution.