Class MapJobExplorerFactoryBean
- java.lang.Object
- org.springframework.batch.core.explore.support.AbstractJobExplorerFactoryBean
- org.springframework.batch.core.explore.support.MapJobExplorerFactoryBean
- All Implemented Interfaces:
org.springframework.beans.factory.FactoryBean<JobExplorer>
,org.springframework.beans.factory.InitializingBean
public class MapJobExplorerFactoryBean extends AbstractJobExplorerFactoryBean implements org.springframework.beans.factory.InitializingBean
AFactoryBean
that automates the creation of aSimpleJobExplorer
using in-memory DAO implementations.- Since:
- 2.0
- Author:
- Dave Syer
Constructor Summary
Constructors Constructor Description MapJobExplorerFactoryBean()
Create a factory with noMapJobRepositoryFactoryBean
.MapJobExplorerFactoryBean(MapJobRepositoryFactoryBean repositoryFactory)
Create an instance with the providedMapJobRepositoryFactoryBean
as a source of Dao instances.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
protected ExecutionContextDao
createExecutionContextDao()
protected JobExecutionDao
createJobExecutionDao()
protected JobInstanceDao
createJobInstanceDao()
protected StepExecutionDao
createStepExecutionDao()
JobExplorer
getObject()
void
setRepositoryFactory(MapJobRepositoryFactoryBean repositoryFactory)
The repository factory that can be used to create daos for the explorer.Methods inherited from class org.springframework.batch.core.explore.support.AbstractJobExplorerFactoryBean
getObjectType, isSingleton
Constructor Detail
MapJobExplorerFactoryBean
public MapJobExplorerFactoryBean(MapJobRepositoryFactoryBean repositoryFactory)
Create an instance with the providedMapJobRepositoryFactoryBean
as a source of Dao instances.- Parameters:
repositoryFactory
- provides the usedJobRepository
MapJobExplorerFactoryBean
public MapJobExplorerFactoryBean()
Create a factory with noMapJobRepositoryFactoryBean
. It must be injected as a property.
Method Detail
setRepositoryFactory
public void setRepositoryFactory(MapJobRepositoryFactoryBean repositoryFactory)
The repository factory that can be used to create daos for the explorer.- Parameters:
repositoryFactory
- aMapJobExplorerFactoryBean
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
java.lang.Exception
- thrown if error occurs.- See Also:
InitializingBean.afterPropertiesSet()
createJobExecutionDao
protected JobExecutionDao createJobExecutionDao() throws java.lang.Exception
- Specified by:
createJobExecutionDao
in classAbstractJobExplorerFactoryBean
- Returns:
- fully configured
JobExecutionDao
implementation. - Throws:
java.lang.Exception
- thrown if error occurs during JobExecutionDao creation.
createJobInstanceDao
protected JobInstanceDao createJobInstanceDao() throws java.lang.Exception
- Specified by:
createJobInstanceDao
in classAbstractJobExplorerFactoryBean
- Returns:
- fully configured
JobInstanceDao
implementation. - Throws:
java.lang.Exception
- thrown if error occurs during JobInstanceDao creation.
createStepExecutionDao
protected StepExecutionDao createStepExecutionDao() throws java.lang.Exception
- Specified by:
createStepExecutionDao
in classAbstractJobExplorerFactoryBean
- Returns:
- fully configured
StepExecutionDao
implementation. - Throws:
java.lang.Exception
- thrown if error occurs during StepExecutionDao creation.
createExecutionContextDao
protected ExecutionContextDao createExecutionContextDao() throws java.lang.Exception
- Specified by:
createExecutionContextDao
in classAbstractJobExplorerFactoryBean
- Returns:
- fully configured
ExecutionContextDao
implementation. - Throws:
java.lang.Exception
- thrown if error occurs during ExecutionContextDao creation.
getObject
public JobExplorer getObject() throws java.lang.Exception
- Specified by:
getObject
in interfaceorg.springframework.beans.factory.FactoryBean<JobExplorer>
- Throws:
java.lang.Exception