public interface LaunchJobService extends org.springframework.context.ApplicationListener<KillService.KillEvent>
| Modifier and Type | Method and Description |
|---|---|
void |
kill()
Terminate job process execution (if still running) or prevent it from launching (if not launched yet).
|
void |
launchProcess(java.io.File jobDirectory,
java.util.Map<java.lang.String,java.lang.String> environmentVariables,
java.util.List<java.lang.String> commandLine,
boolean interactive)
Launch the job process (unless launch was aborted by previous a
kill call). |
JobStatus |
waitFor()
Wait indefinitely for the job process to terminate.
|
void launchProcess(java.io.File jobDirectory,
java.util.Map<java.lang.String,java.lang.String> environmentVariables,
java.util.List<java.lang.String> commandLine,
boolean interactive)
throws JobLaunchException
kill call).jobDirectory - Job directoryenvironmentVariables - additional environment variables (to merge on top of inherited environment)commandLine - command-line executable and argumentsinteractive - launch in interactive mode (inherit I/O) or batch (no input, write outputs to files)JobLaunchException - if the job process failed to launchvoid kill()
JobStatus waitFor() throws java.lang.InterruptedException
java.lang.IllegalStateException - if the process was not launchedjava.lang.InterruptedException - if the calling thread is interrupted while waiting