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 Details

    • SYSTEM_ARG

      public static final String SYSTEM_ARG
      The argument to append to the script name to request that the system is added to the command line.
      See Also:
    • DEFAULT_SCRIPT_NAME

      public static final String DEFAULT_SCRIPT_NAME
      The default name of the python script that will be constructed.
      See Also:
  • Constructor Details

    • JobParametersFactory

      public JobParametersFactory()
  • Method Details

    • getJobParameters

      public abstract JobParameters getJobParameters(Job job, File workingDirectory, String setupScript) throws UnsupportedJobException, JobParametersFactoryException
      Gets job parameters given job description data.
      Parameters:
      job - The job to be executed
      workingDirectory - The working directory where the job will be run
      setupScript - The setup script to run
      Returns:
      A job description to be executed
      Throws:
      UnsupportedJobException - If the factory does not support the job
      JobParametersFactoryException - 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.