Package org.springframework.batch.core
Interface SkipListener<T,S>
- All Superinterfaces:
StepListener
- All Known Implementing Classes:
CompositeSkipListener
,MulticasterBatchListener
,SkipListenerSupport
,StepListenerSupport
Interface for listener to skipped items. Callbacks are called by
Step
implementations at the appropriate time in the step lifecycle. Implementers of this
interface should not assume that any method is called immediately after an error has
been encountered. Because there may be errors later on in processing the chunk, this
listener is not called until just before committing.- Author:
- Dave Syer, Robert Kasanicky, Mahmoud Ben Hassine
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
onSkipInProcess
(T item, Throwable t) This item failed on processing with the given exception, and a skip was called for.default void
Callback for a failure on read that is legal and, consequently, is not going to be re-thrown.default void
onSkipInWrite
(S item, Throwable t) This item failed on write with the given exception, and a skip was called for.
-
Method Details
-
onSkipInRead
Callback for a failure on read that is legal and, consequently, is not going to be re-thrown. In case a transaction is rolled back and items are re-read, this callback occurs repeatedly for the same cause. This happens only if read items are not buffered.- Parameters:
t
- cause of the failure
-
onSkipInWrite
This item failed on write with the given exception, and a skip was called for.- Parameters:
item
- the failed itemt
- the cause of the failure
-
onSkipInProcess
This item failed on processing with the given exception, and a skip was called for.- Parameters:
item
- the failed itemt
- the cause of the failure
-