org.springframework.batch.item.support
Class CompositeItemWriter<T>

java.lang.Object
  extended by org.springframework.batch.item.support.CompositeItemWriter<T>
All Implemented Interfaces:
ItemWriter<T>

public class CompositeItemWriter<T>
extends Object
implements ItemWriter<T>

Calls a collection of ItemWriters in fixed-order sequence.

The implementation is thread-safe if all delegates are thread-safe.

Author:
Robert Kasanicky, Dave Syer

Constructor Summary
CompositeItemWriter()
           
 
Method Summary
 void setDelegates(ItemWriter<? super T>[] delegates)
           
 void write(List<? extends T> item)
          Calls injected ItemProcessors in order.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeItemWriter

public CompositeItemWriter()
Method Detail

setDelegates

public void setDelegates(ItemWriter<? super T>[] delegates)

write

public void write(List<? extends T> item)
           throws Exception
Calls injected ItemProcessors in order.

Specified by:
write in interface ItemWriter<T>
Throws:
Exception - if there are errors. The framework will catch the exception and convert or rethrow it as appropriate.


Copyright © 2009 SpringSource. All Rights Reserved.