public class ClassifierCompositeItemWriter<T> extends java.lang.Object implements ItemWriter<T>
Classifier
.
The implementation is thread-safe if all delegates are thread-safe.Constructor and Description |
---|
ClassifierCompositeItemWriter() |
Modifier and Type | Method and Description |
---|---|
void |
setClassifier(org.springframework.classify.Classifier<T,ItemWriter<? super T>> classifier) |
void |
write(java.util.List<? extends T> items)
Delegates to injected
ItemWriter instances according to their
classification by the Classifier . |
public void setClassifier(org.springframework.classify.Classifier<T,ItemWriter<? super T>> classifier)
classifier
- the classifier to setpublic void write(java.util.List<? extends T> items) throws java.lang.Exception
ItemWriter
instances according to their
classification by the Classifier
.write
in interface ItemWriter<T>
items
- items to be writtenjava.lang.Exception
- if there are errors. The framework will catch the
exception and convert or rethrow it as appropriate.