org.springframework.batch.sample.common
Class InfiniteLoopWriter
java.lang.Object
org.springframework.batch.core.listener.StepExecutionListenerSupport
org.springframework.batch.sample.common.InfiniteLoopWriter
- All Implemented Interfaces:
- StepExecutionListener, StepListener, ItemWriter<Object>
public class InfiniteLoopWriter
- extends StepExecutionListenerSupport
- implements ItemWriter<Object>
Simple module implementation that will always return true to indicate that
processing should continue. This is useful for testing graceful shutdown of
jobs.
- Author:
- Lucas Ward
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InfiniteLoopWriter
public InfiniteLoopWriter()
beforeStep
public void beforeStep(StepExecution stepExecution)
- Description copied from interface:
StepExecutionListener
- Initialize the state of the listener with the
StepExecution
from
the current scope.
- Specified by:
beforeStep
in interface StepExecutionListener
- Overrides:
beforeStep
in class StepExecutionListenerSupport
- See Also:
StepExecutionListener.beforeStep(StepExecution)
write
public void write(List<? extends Object> items)
throws Exception
- Description copied from interface:
ItemWriter
- Process the supplied data element. Will not be called with any null items
in normal operation.
- Specified by:
write
in interface ItemWriter<Object>
- Throws:
Exception
- if there are errors. The framework will catch the
exception and convert or rethrow it as appropriate.
Copyright © 2009 SpringSource. All Rights Reserved.