Class ApplicationContextJobFactory

  • All Implemented Interfaces:
    JobFactory

    public class ApplicationContextJobFactory
    extends java.lang.Object
    implements JobFactory
    A JobFactory that creates its own ApplicationContext and pulls a bean out when asked to create a Job.
    Author:
    Dave Syer
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      JobcreateJob()
      Create an ApplicationContext from the factory provided and pull out a bean with the name given during initialization.
      java.lang.StringgetJobName()
      Just return the name of instance passed in on initialization.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ApplicationContextJobFactory

        public ApplicationContextJobFactory​(java.lang.String jobName,
                                            ApplicationContextFactory applicationContextFactory)
        Parameters:
        jobName - the id of the Job in the application context to be created
        applicationContextFactory - a factory for an application context containing a job with the job name provided
    • Method Detail

      • createJob

        public final Job createJob()
        Create an ApplicationContext from the factory provided and pull out a bean with the name given during initialization.
        Specified by:
        createJob in interface JobFactory
        See Also:
        JobFactory.createJob()