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 void
beforeStep(StepExecution stepExecution)
Initialize the state of the listener with theStepExecution
from the current scope.void
writeFooter(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.IOException
Description copied from interface:FlatFileFooterCallback
Write contents to a file using the suppliedWriter
. It is not required to flush the writer inside this method.- Specified by:
writeFooter
in interfaceFlatFileFooterCallback
- Parameters:
writer
- theWriter
to 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:StepExecutionListener
Initialize the state of the listener with theStepExecution
from the current scope.- Specified by:
beforeStep
in interfaceStepExecutionListener
- Overrides:
beforeStep
in classStepExecutionListenerSupport
- Parameters:
stepExecution
- instance ofStepExecution
.