接口 ItemProcessListener<T,S>
- 所有超级接口:
StepListener
- 所有已知实现类:
CompositeItemProcessListener
,DefaultItemFailureHandler
,ItemListenerSupport
,ItemProcessListenerAdapter
,MulticasterBatchListener
,StagingItemListener
,StepListenerSupport
public interface ItemProcessListener<T,S> extends StepListener
Listener interface for the processing of an item. Implementations of this interface will be notified before and after an item is passed to theItemProcessor
and in the event of any exceptions thrown by the processor.- 作者:
- Dave Syer, Mahmoud Ben Hassine
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 void
afterProcess(T item, S result)
Called afterItemProcessor.process(Object)
returns.void
beforeProcess(T item)
Called beforeItemProcessor.process(Object)
.void
onProcessError(T item, java.lang.Exception e)
Called if an exception was thrown fromItemProcessor.process(Object)
.
方法详细资料
beforeProcess
void beforeProcess(T item)
Called beforeItemProcessor.process(Object)
.- 参数:
item
- to be processed.
afterProcess
void afterProcess(T item, @Nullable S result)
Called afterItemProcessor.process(Object)
returns. If the processor returnsnull
, this method will still be called, with a {code null} result, allowing for notification of 'filtered' items.- 参数:
item
- to be processedresult
- of processing
onProcessError
void onProcessError(T item, java.lang.Exception e)
Called if an exception was thrown fromItemProcessor.process(Object)
.- 参数:
item
- attempted to be processede
- - exception thrown during processing.