javax.batch.api
Interface ItemProcessor<T,R>


public interface ItemProcessor<T,R>

ItemProcessor is used in chunk processing to operate on an input item and produce an output item.


Method Summary
 R processItem(T item)
          The processItem method is part of a chunk step.
 

Method Detail

processItem

R processItem(T item)
              throws Exception
The processItem method is part of a chunk step. It accepts an input item from an item reader and returns an item that gets passed onto the item writer. If processItem returns null, no value is passed onto the chunk's item writer. This effectively enables processItem to filter out unwanted input items.

Parameters:
item - specifies the input item to process.
Returns:
output item to write.
Throws:
Exception - thrown for any errors.


Copyright © 2013. All Rights Reserved.