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()
          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

ReferenceJobFactory

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

createJob

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

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

getJobName

public String getJobName()
Just return the name of instance passed in on initialization.

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


Copyright © 2013 SpringSource. All Rights Reserved.