Interface ItemProcessListener

All Known Implementing Classes:
AbstractItemProcessListener

public interface ItemProcessListener
ItemProcessListener intercepts item processing.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    afterProcess(Object item, Object result)
    The afterProcess method receives control after an item processor processes an item.
    void
    The beforeProcess method receives control before an item processor is called to process the next item.
    void
    The onProcessError method receives control after an item processor processItem throws an exception.
  • Method Details

    • beforeProcess

      void beforeProcess(Object item) throws Exception
      The beforeProcess method receives control before an item processor is called to process the next item. The method receives the item to be processed as an input.
      Parameters:
      item - specifies the item about to be processed.
      Throws:
      Exception - if an error occurs.
    • afterProcess

      void afterProcess(Object item, Object result) throws Exception
      The afterProcess method receives control after an item processor processes an item. The method receives the item processed and the result item as an input.
      Parameters:
      item - specifies the item processed by the item processor.
      result - specifies the item to pass to the item writer.
      Throws:
      Exception - if an error occurs.
    • onProcessError

      void onProcessError(Object item, Exception ex) throws Exception
      The onProcessError method receives control after an item processor processItem throws an exception. The method receives the item sent to the item processor as input.
      Parameters:
      item - specifies the item the processor attempted to process.
      ex - specifies the exception thrown by the item processor.
      Throws:
      Exception - if an error occurs