org.springframework.batch.core.listener
Class CompositeItemReadListener

java.lang.Object
  extended by org.springframework.batch.core.listener.CompositeItemReadListener
All Implemented Interfaces:
ItemReadListener, StepListener

public class CompositeItemReadListener
extends Object
implements ItemReadListener

Author:
Lucas Ward, Dave Syer

Constructor Summary
CompositeItemReadListener()
           
 
Method Summary
 void afterRead(Object item)
          Call the registered listeners in reverse order, respecting and prioritising those that implement Ordered.
 void beforeRead()
          Call the registered listeners in order, respecting and prioritising those that implement Ordered.
 void onReadError(Exception ex)
          Call the registered listeners in reverse order, respecting and prioritising those that implement Ordered.
 void register(ItemReadListener itemReaderListener)
          Register additional listener.
 void setListeners(ItemReadListener[] itemReadListeners)
          Public setter for the listeners.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeItemReadListener

public CompositeItemReadListener()
Method Detail

setListeners

public void setListeners(ItemReadListener[] itemReadListeners)
Public setter for the listeners.

Parameters:
itemReadListeners -

register

public void register(ItemReadListener itemReaderListener)
Register additional listener.

Parameters:
itemReaderListener -

afterRead

public void afterRead(Object item)
Call the registered listeners in reverse order, respecting and prioritising those that implement Ordered.

Specified by:
afterRead in interface ItemReadListener
Parameters:
item - returned from read()
See Also:
ItemReadListener.afterRead(java.lang.Object)

beforeRead

public void beforeRead()
Call the registered listeners in order, respecting and prioritising those that implement Ordered.

Specified by:
beforeRead in interface ItemReadListener
See Also:
ItemReadListener.beforeRead()

onReadError

public void onReadError(Exception ex)
Call the registered listeners in reverse order, respecting and prioritising those that implement Ordered.

Specified by:
onReadError in interface ItemReadListener
Parameters:
ex - thrown from ItemWriter
See Also:
ItemReadListener.onReadError(java.lang.Exception)


Copyright © 2009 SpringSource. All Rights Reserved.