javax.batch.api.chunk.listener
Interface ItemReadListener<T>

Type Parameters:
T - specifies the type processed by an item reader.
All Known Implementing Classes:
AbstractItemReadListener

public interface ItemReadListener<T>

ItemReadListener intercepts item reader processing.


Method Summary
 void afterRead(T item)
          The afterRead method that receives control after an item reader reads an item.
 void beforeRead()
          The beforeRead method that receives control before an item reader is called to read the next item.
 void onReadError(Exception ex)
          The onReadError method that receives control after an item reader throws an exception.
 

Method Detail

beforeRead

void beforeRead()
                throws Exception
The beforeRead method that receives control before an item reader is called to read the next item.

Throws:
Exception - is thrown if an error occurs.

afterRead

void afterRead(T item)
               throws Exception
The afterRead method that receives control after an item reader reads an item. The method receives the item read as an input.

Parameters:
item - specifies the item read by the item reader.
Throws:
Exception - is thrown if an error occurs.

onReadError

void onReadError(Exception ex)
                 throws Exception
The onReadError method that receives control after an item reader throws an exception. This method receives the exception as an input.

Parameters:
ex - specifies the exception that occurred in the item reader.
Throws:
Exception - is thrown if an error occurs.


Copyright © 2013. All Rights Reserved.