org.springframework.batch.core.configuration.support
Class ReferenceJobFactory

java.lang.Object
  extended by org.springframework.batch.core.configuration.support.ReferenceJobFactory
All Implemented Interfaces:
JobFactory

public class ReferenceJobFactory
extends Object
implements JobFactory

A JobFactory that just keeps a reference to a Job. It never modifies its Job.

Author:
Dave Syer

Constructor Summary
ReferenceJobFactory(Job job)
           
 
Method Summary
 Job createJob()
          Just return the instance passed in on initialization.
 String getJobName()
          Returns the job name as passed in on initialization.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferenceJobFactory

public ReferenceJobFactory(Job job)
Parameters:
job - the Job to return from createJob().
Method Detail

createJob

public Job createJob()
Just return the instance passed in on initialization.

Specified by:
createJob in interface JobFactory
See Also:
JobFactory.createJob()

getJobName

public String getJobName()
Returns the job name as passed in on initialization.

Specified by:
getJobName in interface JobFactory
See Also:
JobFactory.getJobName()


Copyright © 2009 SpringSource. All Rights Reserved.