|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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)
ItemWriteListener
ItemWriter.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 ItemWriteListener
item
- written itempublic void beforeWrite(Object item)
ItemWriteListener
ItemWriter.write(Object)
beforeWrite
in interface ItemWriteListener
item
- to be writtenpublic void onWriteError(Exception ex, Object item)
ItemWriteListener
onWriteError
in interface ItemWriteListener
ex
- thrown from ItemWriter
item
- attempted to be written.public void afterRead(Object item)
ItemReadListener
ItemReader.read()
afterRead
in interface ItemReadListener
item
- returned from read()public void beforeRead()
ItemReadListener
ItemReader.read()
beforeRead
in interface ItemReadListener
public void onReadError(Exception ex)
ItemReadListener
onReadError
in interface ItemReadListener
ex
- thrown from ItemWriter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |