Class ApplicationContextJobFactory
- java.lang.Object
- org.springframework.batch.core.configuration.support.ApplicationContextJobFactory
- All Implemented Interfaces:
JobFactory
public class ApplicationContextJobFactory extends java.lang.Object implements JobFactory
AJobFactory
that creates its ownApplicationContext
and pulls a bean out when asked to create aJob
.- Author:
- Dave Syer
Constructor Summary
Constructors Constructor Description ApplicationContextJobFactory(java.lang.String jobName, ApplicationContextFactory applicationContextFactory)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Job
createJob()
Create anApplicationContext
from the factory provided and pull out a bean with the name given during initialization.java.lang.String
getJobName()
Just return the name of instance passed in on initialization.
Constructor Detail
ApplicationContextJobFactory
public ApplicationContextJobFactory(java.lang.String jobName, ApplicationContextFactory applicationContextFactory)
- Parameters:
jobName
- the id of theJob
in the application context to be createdapplicationContextFactory
- a factory for an application context containing a job with the job name provided
Method Detail
createJob
public final Job createJob()
Create anApplicationContext
from the factory provided and pull out a bean with the name given during initialization.- Specified by:
createJob
in interfaceJobFactory
- See Also:
JobFactory.createJob()
getJobName
public java.lang.String getJobName()
Just return the name of instance passed in on initialization.- Specified by:
getJobName
in interfaceJobFactory
- See Also:
JobFactory.getJobName()