Class AbstractItemProcessListener

  • All Implemented Interfaces:
    ItemProcessListener

    public abstract class AbstractItemProcessListener
    extends Object
    implements ItemProcessListener
    The AbstractItemProcessListener provides default implementations of less commonly implemented methods.
    • Constructor Detail

      • AbstractItemProcessListener

        public AbstractItemProcessListener()
    • Method Detail

      • beforeProcess

        public void beforeProcess​(Object item)
                           throws Exception
        Override this method if the ItemProcessListener will do something before the item is processed. The default implementation does nothing.
        Specified by:
        beforeProcess in interface ItemProcessListener
        Parameters:
        item - specifies the item about to be processed.
        Throws:
        Exception - (or subclass) if an error occurs.
      • afterProcess

        public void afterProcess​(Object item,
                                 Object result)
                          throws Exception
        Override this method if the ItemProcessListener will do something after the item is processed. The default implementation does nothing.
        Specified by:
        afterProcess in interface ItemProcessListener
        Parameters:
        item - specifies the item about to be processed.
        result - specifies the item to pass to the item writer.
        Throws:
        Exception - (or subclass) if an error occurs.
      • onProcessError

        public void onProcessError​(Object item,
                                   Exception ex)
                            throws Exception
        Override this method if the ItemProcessListener will do something when the ItemProcessor processItem method throws an exception. The default implementation does nothing.
        Specified by:
        onProcessError in interface ItemProcessListener
        Parameters:
        item - specifies the item about to be processed.
        ex - specifies the exception thrown by the item processor.
        Throws:
        Exception - (or subclass) if an error occurs.