org.springframework.batch.core.listener

## Class JobListenerFactoryBean

- java.lang.Object
- - org.springframework.batch.core.listener.AbstractListenerFactoryBean<JobExecutionListener>
  - - org.springframework.batch.core.listener.JobListenerFactoryBean

- All Implemented Interfaces:
    org.springframework.beans.factory.FactoryBean<java.lang.Object>, org.springframework.beans.factory.InitializingBean
  Direct Known Subclasses:
    JsrJobListenerFactoryBean

      public class JobListenerFactoryBean
      extends AbstractListenerFactoryBean<JobExecutionListener>

  This `AbstractListenerFactoryBean` implementation is used to create a `JobExecutionListener`.
  Since:
    2.0
  Author:
    Lucas Ward, Dan Garrette
  See Also:
    `AbstractListenerFactoryBean`, `JobListenerMetaData`

- - ### Field Summary

    - ### Fields inherited from interface org.springframework.beans.factory.FactoryBean

      `OBJECT_TYPE_ATTRIBUTE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JobListenerFactoryBean()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected java.lang.Class<?>` | `getDefaultListenerClass()`
    `static JobExecutionListener` | `getListener(java.lang.Object delegate)` Convenience method to wrap any object and expose the appropriate `JobExecutionListener` interfaces.
    `protected ListenerMetaData` | `getMetaDataFromPropertyName(java.lang.String propertyName)`
    `protected ListenerMetaData[]` | `getMetaDataValues()`
    `java.lang.Class<?>` | `getObjectType()`
    `static boolean` | `isListener(java.lang.Object delegate)` Convenience method to check whether the given object is or can be made into a `JobExecutionListener`.

    - ### Methods inherited from class org.springframework.batch.core.listener.AbstractListenerFactoryBean

      `afterPropertiesSet, getMethodInvokerByName, getObject, isListener, isSingleton, setDelegate, setMetaDataMap`

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

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

- - ### Constructor Detail

    - #### JobListenerFactoryBean

          public JobListenerFactoryBean()

  - ### Method Detail

    - #### getMetaDataFromPropertyName

          protected ListenerMetaData getMetaDataFromPropertyName(java.lang.String propertyName)

      Specified by:
        `getMetaDataFromPropertyName` in class `AbstractListenerFactoryBean<JobExecutionListener>`

    - #### getMetaDataValues

          protected ListenerMetaData[] getMetaDataValues()

      Specified by:
        `getMetaDataValues` in class `AbstractListenerFactoryBean<JobExecutionListener>`

    - #### getDefaultListenerClass

          protected java.lang.Class<?> getDefaultListenerClass()

      Specified by:
        `getDefaultListenerClass` in class `AbstractListenerFactoryBean<JobExecutionListener>`

    - #### getObjectType

          public java.lang.Class<?> getObjectType()

    - #### getListener

          public static JobExecutionListener getListener(java.lang.Object delegate)

      Convenience method to wrap any object and expose the appropriate `JobExecutionListener` interfaces.
      Parameters:
        `delegate` - a delegate object
      Returns:
        a JobListener instance constructed from the delegate

    - #### isListener

          public static boolean isListener(java.lang.Object delegate)

      Convenience method to check whether the given object is or can be made into a `JobExecutionListener`.
      Parameters:
        `delegate` - the object to check
      Returns:
        true if the delegate is an instance of `JobExecutionListener`, or contains the marker annotations