Class FunctionItemProcessor<I,O>
java.lang.Object
org.springframework.batch.item.function.FunctionItemProcessor<I,O>
- All Implemented Interfaces:
ItemProcessor<I,
O>
An
ItemProcessor
implementation that delegates to a Function
- Since:
- 4.0
- Author:
- Michael Minella
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
FunctionItemProcessor
- Parameters:
function
- the delegate. Must not be null
-
-
Method Details
-
process
Description copied from interface:ItemProcessor
Process the provided item, returning a potentially modified or new item for continued processing. If the returned result isnull
, 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:- an
ItemReader
(which indicates no more items) - a previous
ItemProcessor
in a composite processor (which indicates a filtered item)
- Specified by:
process
in interfaceItemProcessor<I,
O> - Parameters:
item
- to be processed, nevernull
.- Returns:
- potentially modified or new item for continued processing,
null
if processing of the provided item should not continue. - Throws:
Exception
- thrown if exception occurs during processing.
- an
-