|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.batch.core.listener.ItemListenerSupport
public class ItemListenerSupport
Basic no-op implementation of both the ItemWriteListener and
ItemReadListener interfaces. Both are implemented, since it is
very common that both may need to be implemented at once.
| Constructor Summary | |
|---|---|
ItemListenerSupport()
|
|
| Method Summary | |
|---|---|
void |
afterRead(Object item)
Called after ItemReader.read() |
void |
afterWrite(Object item)
Called after ItemWriter.write(Object) If the item is last in a
chunk, this will be called before any transaction is committed, and
before ChunkListener.afterChunk() |
void |
beforeRead()
Called before ItemReader.read() |
void |
beforeWrite(Object item)
Called before ItemWriter.write(Object) |
void |
onReadError(Exception ex)
Called if an error occurs while trying to write. |
void |
onWriteError(Exception ex,
Object item)
Called if an error occurs while trying to write. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ItemListenerSupport()
| Method Detail |
|---|
public void afterWrite(Object item)
ItemWriteListenerItemWriter.write(Object) If the item is last in a
chunk, this will be called before any transaction is committed, and
before ChunkListener.afterChunk()
afterWrite in interface ItemWriteListeneritem - written itempublic void beforeWrite(Object item)
ItemWriteListenerItemWriter.write(Object)
beforeWrite in interface ItemWriteListeneritem - to be written
public void onWriteError(Exception ex,
Object item)
ItemWriteListener
onWriteError in interface ItemWriteListenerex - thrown from ItemWriteritem - attempted to be written.public void afterRead(Object item)
ItemReadListenerItemReader.read()
afterRead in interface ItemReadListeneritem - returned from read()public void beforeRead()
ItemReadListenerItemReader.read()
beforeRead in interface ItemReadListenerpublic void onReadError(Exception ex)
ItemReadListener
onReadError in interface ItemReadListenerex - thrown from ItemWriter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||