Class JobProcessFactory
java.lang.Object
uk.ac.manchester.spinnaker.nmpiexec.jobprocess.JobProcessFactory
A factory for creating 
JobProcess instances given a
 JobParameters instance.- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic interfaceA version ofSupplierthat builds a job process.
- 
Constructor SummaryConstructorsConstructorDescriptionJobProcessFactory(String threadGroupName) Create a factory.JobProcessFactory(ThreadGroup threadGroup) Create a factory.
- 
Method SummaryModifier and TypeMethodDescription<P extends JobParameters>
 voidaddMapping(Class<P> parameterType, JobProcessFactory.ProcessSupplier<P> processSupplier) Adds a new type mapping.<P extends JobParameters>
 JobProcess<P>createProcess(P parameters) Creates aJobProcessgiven aJobParametersinstance.Collection<Class<? extends JobParameters>>Get the types of parameters supported.
- 
Constructor Details- 
JobProcessFactoryCreate a factory.- Parameters:
- threadGroup- The thread group for the factory. All threads created by the factory will be within this group.
 
- 
JobProcessFactoryCreate a factory.- Parameters:
- threadGroupName- The name of the thread group for the factory. All threads created by the factory will be within this group.
 
 
- 
- 
Method Details- 
addMappingpublic <P extends JobParameters> void addMapping(Class<P> parameterType, JobProcessFactory.ProcessSupplier<P> processSupplier) Adds a new type mapping.- Type Parameters:
- P- The type of parameters that this mapping will handle.
- Parameters:
- parameterType- The job parameter type
- processSupplier- The job process supplier
 
- 
getParameterTypesGet the types of parameters supported.- Returns:
- A collection of types of parameters
 
- 
createProcessCreates aJobProcessgiven aJobParametersinstance.- Type Parameters:
- P- The type of the job parameters.
- Parameters:
- parameters- The parameters of the job
- Returns:
- A JobProcess matching the parameters
- Throws:
- IllegalArgumentException- If the type of the job parameters is unexpected.
 
 
-