example
Class ExampleItemWriter

java.lang.Object
  extended by org.springframework.batch.item.support.AbstractItemWriter
      extended by example.ExampleItemWriter
All Implemented Interfaces:
ItemWriter

public class ExampleItemWriter
extends AbstractItemWriter

Dummy ItemWriter which only logs data it receives.


Constructor Summary
ExampleItemWriter()
           
 
Method Summary
 void write(Object data)
          Process the supplied data element.
 
Methods inherited from class org.springframework.batch.item.support.AbstractItemWriter
clear, flush
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExampleItemWriter

public ExampleItemWriter()
Method Detail

write

public void write(Object data)
           throws Exception
Description copied from interface: ItemWriter
Process the supplied data element. Will be called multiple times during a larger batch operation. Will not be called with null data in normal operation.

Throws:
Exception - if there are errors. If the writer is used inside a retry or a batch the framework will catch the exception and convert or rethrow it as appropriate.
See Also:
ItemWriter.write(Object)


Copyright © 2009 SpringSource. All Rights Reserved.