public class CompositeItemProcessListener<T,S> extends java.lang.Object implements ItemProcessListener<T,S>
Constructor and Description |
---|
CompositeItemProcessListener() |
Modifier and Type | Method and Description |
---|---|
void |
afterProcess(T item,
S result)
Call the registered listeners in reverse order, respecting and
prioritising those that implement
Ordered . |
void |
beforeProcess(T item)
Call the registered listeners in order, respecting and prioritising those
that implement
Ordered . |
void |
onProcessError(T item,
java.lang.Exception e)
Call the registered listeners in reverse order, respecting and
prioritising those that implement
Ordered . |
void |
register(ItemProcessListener<? super T,? super S> itemReaderListener)
Register additional listener.
|
void |
setListeners(java.util.List<? extends ItemProcessListener<? super T,? super S>> itemReadListeners)
Public setter for the listeners.
|
public void setListeners(java.util.List<? extends ItemProcessListener<? super T,? super S>> itemReadListeners)
itemReadListeners
- public void register(ItemProcessListener<? super T,? super S> itemReaderListener)
itemReaderListener
- public void afterProcess(T item, S result)
Ordered
.afterProcess
in interface ItemProcessListener<T,S>
item
- to be processedresult
- of processingItemProcessListener.afterProcess(java.lang.Object,
java.lang.Object)
public void beforeProcess(T item)
Ordered
.beforeProcess
in interface ItemProcessListener<T,S>
item
- to be processed.ItemProcessListener.beforeProcess(java.lang.Object)
public void onProcessError(T item, java.lang.Exception e)
Ordered
.onProcessError
in interface ItemProcessListener<T,S>
item
- attempted to be processede
- - exception thrown during processing.ItemProcessListener.onProcessError(java.lang.Object,
java.lang.Exception)