org.springframework.batch.admin.integration
Class JobConfigurationResourceLoader
java.lang.Object
org.springframework.batch.admin.integration.JobConfigurationResourceLoader
- All Implemented Interfaces:
- ApplicationContextAware
@MessageEndpoint
public class JobConfigurationResourceLoader
- extends Object
- implements ApplicationContextAware
Load XML from a Spring Resource and create an
ApplicationContext, registering any Job instances defined in
a JobRegistry. If this component is itself configured with Spring,
then its own ApplicationContext will be the parent for the new one, and the
child will inherit AOP configuration, as well as property placeholder and
custom editor configuration from the parent.
- Author:
- Dave Syer
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JobConfigurationResourceLoader
public JobConfigurationResourceLoader()
setJobLoader
public void setJobLoader(JobLoader jobLoader)
setJobService
public void setJobService(JobService jobService)
setApplicationContext
public void setApplicationContext(ApplicationContext applicationContext)
throws BeansException
- Specified by:
setApplicationContext in interface ApplicationContextAware
- Throws:
BeansException
loadJobs
@ServiceActivator
public Collection<JobInfo> loadJobs(Resource resource)
throws DuplicateJobException
- Throws:
DuplicateJobException
createApplicationContextFactory
protected ApplicationContextFactory createApplicationContextFactory(ApplicationContext parent,
Resource resource)
- Create an application context from the resource provided. Extension point
for subclasses if they need to customize the context in any way. The
default uses a
ClassPathXmlApplicationContextFactory.
- Parameters:
parent - the parent application context (or null if there is none)resource - the location of the XML configuration
- Returns:
- an application context containing jobs
Copyright © 2011. All Rights Reserved.