ch.javasoft.job
Class ExecJobProcessor
java.lang.Object
ch.javasoft.job.AbstractJobProcessor<ExecJobMonitor,Void,ExecJob>
ch.javasoft.job.ExecJobProcessor
- All Implemented Interfaces:
- JobProcessor<ExecJobMonitor,Void,ExecJob>
public class ExecJobProcessor
- extends AbstractJobProcessor<ExecJobMonitor,Void,ExecJob>
The ExecJobProcessor is specifically designed to execute
ExecJobs.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final ExecJobProcessor INSTANCE
- Default instance
ExecJobProcessor
public ExecJobProcessor()
exec
public ExecJobMonitor exec(ExecJob job)
- Description copied from interface:
JobProcessor
- Usually executes the given job and returns immediately, without waiting
for completion, corresponding to
Executable.exec(). Note that the
exact behaviour is up to the implementor and might diverge from this
general description.
- Parameters:
job - the job to execute
- Returns:
- the job status, which also allows access to the result
when execution completed
execAndWait
public JobResult<Void> execAndWait(ExecJob job)
throws InterruptedException
- Description copied from interface:
JobProcessor
- Usually executes the given job and waits for completion, corresponding to
Executable.execAndWait(). Note that the exact behaviour is up to
the implementor and might diverge from this general description.
- Specified by:
execAndWait in interface JobProcessor<ExecJobMonitor,Void,ExecJob>- Overrides:
execAndWait in class AbstractJobProcessor<ExecJobMonitor,Void,ExecJob>
- Parameters:
job - the job to execute
- Returns:
- the job result, giving access to the return value on success,
or to the exception if execution caused any.
- Throws:
InterruptedException