ch.javasoft.job
Interface Job<R>
- Type Parameters:
R - The return value type of the result
- All Known Implementing Classes:
- AbstractJob, ExecJob, PipeJob
public interface Job<R>
A Job is a generalization of Runnable, with return
value and exception.
Some job implementations might also implement Executable, which
allows execution in a non-synchronized manner.
|
Method Summary |
R |
run()
Executes the job, blocks until the result is present or an exception
is thrown. |
run
R run()
throws Throwable
- Executes the job, blocks until the result is present or an exception
is thrown.
Note: It is usually not a good idea to call this method manually,
but to let this job be executed by a JobProcessor. Most job
implementations also implement Executable with the more
preferable Executable.exec() and Executable.execAndWait()
methods.
- Returns:
- the job result, or
null of type Void for
void methods
- Throws:
Throwable - if any exception occurs