Class ItemWriterAdapter<T>

All Implemented Interfaces:
ItemWriter<T>, org.springframework.beans.factory.InitializingBean

public class ItemWriterAdapter<T> extends AbstractMethodInvokingDelegator<T> implements ItemWriter<T>
Delegates item processing to a custom method - passes the item as an argument for the delegate method.

This adapter is thread-safe as long as the delegate ItemWriter is thread-safe.

Robert Kasanicky, Mahmoud Ben Hassine
See Also:
  • Constructor Details

    • ItemWriterAdapter

      public ItemWriterAdapter()
  • Method Details

    • write

      public void write(Chunk<? extends T> items) throws Exception
      Description copied from interface: ItemWriter
      Process the supplied data element. Will not be called with any null items in normal operation.
      Specified by:
      write in interface ItemWriter<T>
      items - of items to be written. Must not be null.
      Exception - if there are errors. The framework will catch the exception and convert or rethrow it as appropriate.