Example usage for org.springframework.batch.repeat RepeatListener after

List of usage examples for org.springframework.batch.repeat RepeatListener after

Introduction

In this page you can find the example usage for org.springframework.batch.repeat RepeatListener after.

Prototype

void after(RepeatContext context, RepeatStatus result);

Source Link

Document

Called by the framework after each item has been processed, unless the item processing results in an exception.

Usage

From source file:org.springframework.batch.repeat.support.RepeatTemplate.java

/**
 * Convenience method to execute after interceptors on a callback result.
 * /* w  w w . j a v  a 2 s  . co m*/
 * @param context the current batch context.
 * @param value the result of the callback to process.
 */
protected void executeAfterInterceptors(final RepeatContext context, RepeatStatus value) {

    // Don't re-throw exceptions here: let the exception handler deal with
    // that...

    if (value != null && value.isContinuable()) {
        for (int i = listeners.length; i-- > 0;) {
            RepeatListener interceptor = listeners[i];
            interceptor.after(context, value);
        }

    }

}