public class FunctionItemProcessor<I,O> extends java.lang.Object implements ItemProcessor<I,O>
ItemProcessor
implementation that delegates to a Function
Constructor and Description |
---|
FunctionItemProcessor(java.util.function.Function<I,O> function) |
Modifier and Type | Method and Description |
---|---|
O |
process(I item)
Process the provided item, returning a potentially modified or new item for continued
processing.
|
@Nullable public O process(I item) throws java.lang.Exception
ItemProcessor
null
, it is assumed that processing of the item
should not continue.
A null
item will never reach this method because the only possible sources are:
ItemReader
(which indicates no more items)ItemProcessor
in a composite processor (which indicates a filtered item)process
in interface ItemProcessor<I,O>
item
- to be processed, never null
.null
if processing of the
provided item should not continue.java.lang.Exception
- thrown if exception occurs during processing.