org.springframework.batch.core.configuration.support
Class ClassPathXmlApplicationContextJobFactory
java.lang.Object
org.springframework.batch.core.configuration.support.ClassPathXmlApplicationContextJobFactory
- All Implemented Interfaces:
- JobFactory
public class ClassPathXmlApplicationContextJobFactory
- extends Object
- implements JobFactory
A JobFactory
that creates its own ApplicationContext
from a
path supplied, and pulls a bean out when asked to create a Job
.
- Author:
- Dave Syer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassPathXmlApplicationContextJobFactory
public ClassPathXmlApplicationContextJobFactory(String beanName,
String path,
ApplicationContext parent)
- Parameters:
beanName
- the id of the Job
in the application context to
be createdpath
- the path to the XML configuration containing the Job
parent
- the application context to use as a parent (or null)
createJob
public Job createJob()
- Create a
ClassPathXmlApplicationContext
from the path provided
and pull out a bean with the name given during initialization.
- Specified by:
createJob
in interface JobFactory
- See Also:
JobFactory.createJob()
getJobName
public String getJobName()
- Return the bean name of the job in the application context. N.B. this is
usually the name of the job as well, but it needn't be. The important
thing is that the job can be located by this name.
- Specified by:
getJobName
in interface JobFactory
- See Also:
JobFactory.getJobName()
Copyright © 2009 SpringSource. All Rights Reserved.