T
- input typeS
- output typepublic class ItemProcessListenerAdapter<T,S> extends java.lang.Object implements ItemProcessListener<T,S>
ItemProcessListener
Constructor and Description |
---|
ItemProcessListenerAdapter(javax.batch.api.chunk.listener.ItemProcessListener delegate) |
Modifier and Type | Method and Description |
---|---|
void |
afterProcess(T item,
S result)
Called after
ItemProcessor.process(Object) returns. |
void |
beforeProcess(T item)
Called before
ItemProcessor.process(Object) . |
void |
onProcessError(T item,
java.lang.Exception e)
Called if an exception was thrown from
ItemProcessor.process(Object) . |
public ItemProcessListenerAdapter(javax.batch.api.chunk.listener.ItemProcessListener delegate)
delegate
- to be called within the batch lifecyclepublic void beforeProcess(T item)
ItemProcessListener
ItemProcessor.process(Object)
.beforeProcess
in interface ItemProcessListener<T,S>
item
- to be processed.public void afterProcess(T item, @Nullable S result)
ItemProcessListener
ItemProcessor.process(Object)
returns. If the
processor returns null
, this method will still be called, with
a {code null} result, allowing for notification of 'filtered' items.afterProcess
in interface ItemProcessListener<T,S>
item
- to be processedresult
- of processingpublic void onProcessError(T item, java.lang.Exception e)
ItemProcessListener
ItemProcessor.process(Object)
.onProcessError
in interface ItemProcessListener<T,S>
item
- attempted to be processede
- - exception thrown during processing.