org.springframework.batch.core.jsr

## Class ItemProcessListenerAdapter<T,S>

- java.lang.Object
- - org.springframework.batch.core.jsr.ItemProcessListenerAdapter<T,S>

- Type Parameters:
    `T` - input type
    `S` - output type
  All Implemented Interfaces:
    ItemProcessListener<T,S>, StepListener

      public class ItemProcessListenerAdapter<T,S>
      extends java.lang.Object
      implements ItemProcessListener<T,S>

  Wrapper class for `ItemProcessListener`
  Since:
    3.0
  Author:
    Michael Minella

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ItemProcessListenerAdapter(javax.batch.api.chunk.listener.ItemProcessListener delegate)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `afterProcess(T item, S result)` Called after `ItemProcessor.process(Object)` returns.
    `void` | `beforeProcess(T item)` Called before `ItemProcessor.process(Object)`.
    `void` | `onProcessError(T item, java.lang.Exception e)` Called if an exception was thrown from `ItemProcessor.process(Object)`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ItemProcessListenerAdapter

          public ItemProcessListenerAdapter(javax.batch.api.chunk.listener.ItemProcessListener delegate)

      Parameters:
        `delegate` - to be called within the batch lifecycle

  - ### Method Detail

    - #### beforeProcess

          public void beforeProcess(T item)

      Description copied from interface: `ItemProcessListener`
      Called before `ItemProcessor.process(Object)`.
      Specified by:
        `beforeProcess` in interface `ItemProcessListener<T,S>`
      Parameters:
        `item` - to be processed.

    - #### afterProcess

          public void afterProcess(T item,
                                   S result)

      Description copied from interface: `ItemProcessListener`
      Called after `ItemProcessor.process(Object)` returns. If the processor returns null, this method will still be called, with a null result, allowing for notification of 'filtered' items.
      Specified by:
        `afterProcess` in interface `ItemProcessListener<T,S>`
      Parameters:
        `item` - to be processed
        `result` - of processing

    - #### onProcessError

          public void onProcessError(T item,
                                     java.lang.Exception e)

      Description copied from interface: `ItemProcessListener`
      Called if an exception was thrown from `ItemProcessor.process(Object)`.
      Specified by:
        `onProcessError` in interface `ItemProcessListener<T,S>`
      Parameters:
        `item` - attempted to be processed
        `e` - - exception thrown during processing.