public class ApplicationContextJobFactory extends Object implements JobFactory
JobFactory
that creates its own ApplicationContext
and
pulls a bean out when asked to create a Job
.Constructor and Description |
---|
ApplicationContextJobFactory(String jobName,
ApplicationContextFactory applicationContextFactory) |
Modifier and Type | Method and Description |
---|---|
Job |
createJob()
Create an
ApplicationContext from the factory provided and pull
out a bean with the name given during initialization. |
String |
getJobName()
Just return the name of instance passed in on initialization.
|
public ApplicationContextJobFactory(String jobName, ApplicationContextFactory applicationContextFactory)
jobName
- the id of the Job
in the application context to be
createdapplicationContextFactory
- a factory for an application context
containing a job with the job name providedpublic final Job createJob()
ApplicationContext
from the factory provided and pull
out a bean with the name given during initialization.createJob
in interface JobFactory
JobFactory.createJob()
public String getJobName()
getJobName
in interface JobFactory
JobFactory.getJobName()
Copyright © 2014 Pivotal. All rights reserved.