org.springframework.batch.core
Interface SkipListener

All Superinterfaces:
StepListener
All Known Implementing Classes:
CompositeSkipListener, MulticasterBatchListener, SkipListenerSupport

public interface SkipListener
extends StepListener

Interface for listener to skipped items. Callbacks will be called by Step implementations at the appropriate time in the step lifecycle. Callbacks must always be made (where relevant) in a transaction that is still valid: i.e. possibly on a read error, but not on a write error.

Author:
Dave Syer

Method Summary
 void onSkipInRead(Throwable t)
          Callback for a failure on read that is legal, so is not going to be re-thrown.
 void onSkipInWrite(Object item, Throwable t)
          This item failed on write with the given exception, and a skip was called for.
 

Method Detail

onSkipInRead

void onSkipInRead(Throwable t)
Callback for a failure on read that is legal, so is not going to be re-thrown.

Parameters:
t -

onSkipInWrite

void onSkipInWrite(Object item,
                   Throwable t)
This item failed on write with the given exception, and a skip was called for. The callback is deferred until a new transaction is available. This callback might occur more than once for the same item, but only once in successful transaction.

Parameters:
item - the failed item
t - the cause of the failure


Copyright © 2008 SpringSource. All Rights Reserved.