org.springframework.batch.admin.integration
Class JobConfigurationResourceLoader
java.lang.Object
org.springframework.batch.admin.integration.JobConfigurationResourceLoader
- All Implemented Interfaces:
- org.springframework.context.ApplicationContextAware
@MessageEndpoint
public class JobConfigurationResourceLoader
- extends java.lang.Object
- implements org.springframework.context.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
|
Method Summary |
protected org.springframework.batch.core.configuration.support.ApplicationContextFactory |
createApplicationContextFactory(org.springframework.context.ApplicationContext parent,
org.springframework.core.io.Resource resource)
Create an application context from the resource provided. |
java.util.Collection<JobInfo> |
loadJobs(org.springframework.core.io.Resource resource)
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
|
void |
setJobLoader(org.springframework.batch.core.configuration.support.JobLoader jobLoader)
|
void |
setJobService(JobService jobService)
|
| 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(org.springframework.batch.core.configuration.support.JobLoader jobLoader)
setJobService
public void setJobService(JobService jobService)
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
- Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
loadJobs
@ServiceActivator
public java.util.Collection<JobInfo> loadJobs(org.springframework.core.io.Resource resource)
throws org.springframework.batch.core.configuration.DuplicateJobException
- Throws:
org.springframework.batch.core.configuration.DuplicateJobException
createApplicationContextFactory
protected org.springframework.batch.core.configuration.support.ApplicationContextFactory createApplicationContextFactory(org.springframework.context.ApplicationContext parent,
org.springframework.core.io.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.