public class CompositeItemWriteListener<S> extends java.lang.Object implements ItemWriteListener<S>
Constructor and Description |
---|
CompositeItemWriteListener() |
Modifier and Type | Method and Description |
---|---|
void |
afterWrite(java.util.List<? extends S> items)
Call the registered listeners in reverse order, respecting and
prioritising those that implement
Ordered . |
void |
beforeWrite(java.util.List<? extends S> items)
Call the registered listeners in order, respecting and prioritising those
that implement
Ordered . |
void |
onWriteError(java.lang.Exception ex,
java.util.List<? extends S> items)
Call the registered listeners in reverse order, respecting and
prioritising those that implement
Ordered . |
void |
register(ItemWriteListener<? super S> itemWriteListener)
Register additional listener.
|
void |
setListeners(java.util.List<? extends ItemWriteListener<? super S>> itemWriteListeners)
Public setter for the listeners.
|
public void setListeners(java.util.List<? extends ItemWriteListener<? super S>> itemWriteListeners)
itemWriteListeners
- public void register(ItemWriteListener<? super S> itemWriteListener)
itemWriteListener
- public void afterWrite(java.util.List<? extends S> items)
Ordered
.afterWrite
in interface ItemWriteListener<S>
items
- written itemsItemWriteListener.afterWrite(java.util.List)
public void beforeWrite(java.util.List<? extends S> items)
Ordered
.beforeWrite
in interface ItemWriteListener<S>
items
- to be writtenItemWriteListener.beforeWrite(List)
public void onWriteError(java.lang.Exception ex, java.util.List<? extends S> items)
Ordered
.onWriteError
in interface ItemWriteListener<S>
ex
- thrown from ItemWriter
items
- attempted to be written.ItemWriteListener.onWriteError(Exception, List)