Class FunctionItemProcessor<I,O>
- java.lang.Object
- org.springframework.batch.item.function.FunctionItemProcessor<I,O>
- All Implemented Interfaces:
ItemProcessor<I,O>
public class FunctionItemProcessor<I,O> extends java.lang.Object implements ItemProcessor<I,O>
AnItemProcessorimplementation that delegates to aFunction- Since:
- 4.0
- Author:
- Michael Minella
Constructor Summary
Constructors Constructor Description FunctionItemProcessor(java.util.function.Function<I,O> function)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Oprocess(I item)Process the provided item, returning a potentially modified or new item for continued processing.
Method Detail
process
public O process(I item) throws java.lang.Exception
Description copied from interface:ItemProcessorProcess the provided item, returning a potentially modified or new item for continued processing. If the returned result is null, it is assumed that processing of the item should not continue.- Specified by:
processin interfaceItemProcessor<I,O>- Parameters:
item- to be processed- Returns:
- potentially modified or new item for continued processing,
nullif processing of the provided item should not continue. - Throws:
java.lang.Exception- thrown if exception occurs during processing.