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>
ThisAbstractListenerFactoryBean
implementation is used to create aJobExecutionListener
.- Since:
- 2.0
- Author:
- Lucas Ward, Dan Garrette
- See Also:
AbstractListenerFactoryBean
,JobListenerMetaData
Constructor Summary
Constructors Constructor Description JobListenerFactoryBean()
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Class<?>
getDefaultListenerClass()
static JobExecutionListener
getListener(java.lang.Object delegate)
Convenience method to wrap any object and expose the appropriateJobExecutionListener
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 aJobExecutionListener
.Methods inherited from class org.springframework.batch.core.listener.AbstractListenerFactoryBean
afterPropertiesSet, getMethodInvokerByName, getObject, isListener, isSingleton, setDelegate, setMetaDataMap
Method Detail
getMetaDataFromPropertyName
protected ListenerMetaData getMetaDataFromPropertyName(java.lang.String propertyName)
- Specified by:
getMetaDataFromPropertyName
in classAbstractListenerFactoryBean<JobExecutionListener>
getMetaDataValues
protected ListenerMetaData[] getMetaDataValues()
- Specified by:
getMetaDataValues
in classAbstractListenerFactoryBean<JobExecutionListener>
getDefaultListenerClass
protected java.lang.Class<?> getDefaultListenerClass()
- Specified by:
getDefaultListenerClass
in classAbstractListenerFactoryBean<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 appropriateJobExecutionListener
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 aJobExecutionListener
.- Parameters:
delegate
- the object to check- Returns:
- true if the delegate is an instance of
JobExecutionListener
, or contains the marker annotations