org.springframework.batch.integration.item
Class MessageChannelItemWriter

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

public class MessageChannelItemWriter
extends AbstractItemWriter

Author:
Dave Syer

Constructor Summary
MessageChannelItemWriter()
           
 
Method Summary
 void setChannel(org.springframework.integration.channel.MessageChannel channel)
          Public setter for the channel.
 void write(Object item)
          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

MessageChannelItemWriter

public MessageChannelItemWriter()
Method Detail

setChannel

public void setChannel(org.springframework.integration.channel.MessageChannel channel)
Public setter for the channel.

Parameters:
channel - the channel to set

write

public void write(Object item)
           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.


Copyright © 2009 SpringSource. All Rights Reserved.