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.

Author:
Dave Syer, Robert Kasanicky

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. In case transaction is rolled back and items are re-read, this callback will occur repeatedly for the same cause.

Parameters:
t - cause of the failure

onSkipInWrite

void onSkipInWrite(Object item,
                   Throwable t)
This item failed on write with the given exception, and a skip was called for. The callback occurs immediately after the item is marked for future skipping and is called only once for the same item, regardless of rollbacks (chunk may be re-processed several times or the exception on write may not cause rollback at all).

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


Copyright © 2009 SpringSource. All Rights Reserved.