S
- type to be written by the associated ItemWriter
public class ItemWriteListenerAdapter<S> extends java.lang.Object implements ItemWriteListener<S>
ItemWriteListener
to
a ItemWriteListener
.Constructor and Description |
---|
ItemWriteListenerAdapter(javax.batch.api.chunk.listener.ItemWriteListener delegate) |
Modifier and Type | Method and Description |
---|---|
void |
afterWrite(java.util.List<? extends S> items)
Called after
ItemWriter.write(java.util.List) This will be
called before any transaction is committed, and before
ChunkListener.afterChunk(ChunkContext) |
void |
beforeWrite(java.util.List<? extends S> items)
Called before
ItemWriter.write(java.util.List) |
void |
onWriteError(java.lang.Exception exception,
java.util.List<? extends S> items)
Called if an error occurs while trying to write.
|
public ItemWriteListenerAdapter(javax.batch.api.chunk.listener.ItemWriteListener delegate)
public void beforeWrite(java.util.List<? extends S> items)
ItemWriteListener
ItemWriter.write(java.util.List)
beforeWrite
in interface ItemWriteListener<S>
items
- to be writtenpublic void afterWrite(java.util.List<? extends S> items)
ItemWriteListener
ItemWriter.write(java.util.List)
This will be
called before any transaction is committed, and before
ChunkListener.afterChunk(ChunkContext)
afterWrite
in interface ItemWriteListener<S>
items
- written itemspublic void onWriteError(java.lang.Exception exception, java.util.List<? extends S> items)
ItemWriteListener
onWriteError
in interface ItemWriteListener<S>
exception
- thrown from ItemWriter
items
- attempted to be written.