Class AbstractItemReadListener

  • All Implemented Interfaces:
    ItemReadListener

    public abstract class AbstractItemReadListener
    extends java.lang.Object
    implements ItemReadListener
    The AbstractItemReadListener provides default implementations of less commonly implemented methods.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterRead​(java.lang.Object item)
      Override this method if the ItemReadListener will do something after the item is read.
      void beforeRead()
      Override this method if the ItemReadListener will do something before the item is read.
      void onReadError​(java.lang.Exception ex)
      Override this method if the ItemReadListener will do something when the ItemReader readItem method throws an exception.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractItemReadListener

        public AbstractItemReadListener()
    • Method Detail

      • beforeRead

        public void beforeRead()
                        throws java.lang.Exception
        Override this method if the ItemReadListener will do something before the item is read. The default implementation does nothing.
        Specified by:
        beforeRead in interface ItemReadListener
        Throws:
        java.lang.Exception - (or subclass) if an error occurs.
      • afterRead

        public void afterRead​(java.lang.Object item)
                       throws java.lang.Exception
        Override this method if the ItemReadListener will do something after the item is read. The default implementation does nothing.
        Specified by:
        afterRead in interface ItemReadListener
        Parameters:
        item - last item read by ItemReader
        Throws:
        java.lang.Exception - (or subclass) if an error occurs.
      • onReadError

        public void onReadError​(java.lang.Exception ex)
                         throws java.lang.Exception
        Override this method if the ItemReadListener will do something when the ItemReader readItem method throws an exception. The default implementation does nothing.
        Specified by:
        onReadError in interface ItemReadListener
        Parameters:
        ex - exception thrown from readItem method
        Throws:
        java.lang.Exception - (or subclass) if an error occurs.