类 ClassifierCompositeItemProcessor<I,O>
- java.lang.Object
- org.springframework.batch.item.support.ClassifierCompositeItemProcessor<I,O>
- 所有已实现的接口:
ItemProcessor<I,O>
public class ClassifierCompositeItemProcessor<I,O> extends java.lang.Object implements ItemProcessor<I,O>
Calls one of a collection of ItemProcessors, based on a router pattern implemented through the providedClassifier
. Note the user is responsible for injecting aClassifier
that returns an ItemProcessor that conforms to the declared input and output types.- 从以下版本开始:
- 3.0
- 作者:
- Jimmy Praet
构造器概要
构造器 构造器 说明 ClassifierCompositeItemProcessor()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 O
process(I item)
Delegates to injectedItemProcessor
instances according to the classification by theClassifier
.void
setClassifier(org.springframework.classify.Classifier<? super I,ItemProcessor<?,? extends O>> classifier)
Establishes the classifier that will determine whichItemProcessor
to use.
构造器详细资料
ClassifierCompositeItemProcessor
public ClassifierCompositeItemProcessor()
方法详细资料
setClassifier
public void setClassifier(org.springframework.classify.Classifier<? super I,ItemProcessor<?,? extends O>> classifier)
Establishes the classifier that will determine whichItemProcessor
to use.- 参数:
classifier
- theClassifier
to set
process
public O process(I item) throws java.lang.Exception
Delegates to injectedItemProcessor
instances according to the classification by theClassifier
.- 指定者:
process
在接口中ItemProcessor<I,O>
- 参数:
item
- to be processed- 返回:
- potentially modified or new item for continued processing,
null
if processing of the provided item should not continue. - 抛出:
java.lang.Exception
- thrown if exception occurs during processing.