Interface ItemProcessListener

  • All Known Implementing Classes:
    AbstractItemProcessListener


    public interface ItemProcessListener
    ItemProcessListener intercepts item processing.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void afterProcess​(java.lang.Object item, java.lang.Object result)
      The afterProcess method receives control after an item processor processes an item.
      void beforeProcess​(java.lang.Object item)
      The beforeProcess method receives control before an item processor is called to process the next item.
      void onProcessError​(java.lang.Object item, java.lang.Exception ex)
      The afterProcess method receives control after an item processor processes an item.
    • Method Detail

      • beforeProcess

        void beforeProcess​(java.lang.Object item)
                    throws java.lang.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:
        java.lang.Exception - if an error occurs.
      • afterProcess

        void afterProcess​(java.lang.Object item,
                          java.lang.Object result)
                   throws java.lang.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 about to be processed.
        result - specifies the item to pass to the item writer.
        Throws:
        java.lang.Exception - if an error occurs.
      • onProcessError

        void onProcessError​(java.lang.Object item,
                            java.lang.Exception ex)
                     throws java.lang.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 about to be processed.
        ex - specifies the exception thrown by the item processor.
        Throws:
        java.lang.Exception