Class JobParametersFactory
java.lang.Object
uk.ac.manchester.spinnaker.nmpiexec.job_parameters.JobParametersFactory
public abstract class JobParametersFactory extends Object
A factory that produces job parameters.
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_SCRIPT_NAME
The default name of the python script that will be constructed.static String
SYSTEM_ARG
The argument to append to the script name to request that the system is added to the command line. -
Constructor Summary
Constructors Constructor Description JobParametersFactory()
-
Method Summary
Modifier and Type Method Description abstract JobParameters
getJobParameters(Job job, File workingDirectory, String setupScript)
Gets job parameters given job description data.static JobParameters
getJobParameters(Job job, File workingDirectory, String setupScript, Map<String,JobParametersFactoryException> errors)
Get the parameters from a job.
-
Field Details
-
SYSTEM_ARG
The argument to append to the script name to request that the system is added to the command line.- See Also:
- Constant Field Values
-
DEFAULT_SCRIPT_NAME
The default name of the python script that will be constructed.- See Also:
- Constant Field Values
-
-
Constructor Details
-
JobParametersFactory
public JobParametersFactory()
-
-
Method Details
-
getJobParameters
public abstract JobParameters getJobParameters(Job job, File workingDirectory, String setupScript) throws UnsupportedJobException, JobParametersFactoryExceptionGets job parameters given job description data.- Parameters:
job
- The job to be executedworkingDirectory
- The working directory where the job will be runsetupScript
- The setup script to run- Returns:
- A job description to be executed
- Throws:
UnsupportedJobException
- If the factory does not support the jobJobParametersFactoryException
- If there was an error getting the parameters
-
getJobParameters
public static JobParameters getJobParameters(Job job, File workingDirectory, String setupScript, Map<String,JobParametersFactoryException> errors)Get the parameters from a job.- Parameters:
job
- The job that these will be parameters for.workingDirectory
- The working directory for the job.setupScript
- The setup script.errors
- What errors were found in the process of getting the parameters.- Returns:
- The parameters, or
null
if the parameters can't be generated.
-