ch.javasoft.job
Class NewThreadJobProcessor<R>
java.lang.Object
ch.javasoft.job.AbstractJobProcessor<R,R,Job<? extends R>>
ch.javasoft.job.NewThreadJobProcessor<R>
- Type Parameters:
R - The final result returned by the job after successful
termination.
- All Implemented Interfaces:
- JobProcessor<R,R,Job<? extends R>>
public class NewThreadJobProcessor<R>
- extends AbstractJobProcessor<R,R,Job<? extends R>>
The NewThreadJobProcessor executes jobs asynchroneously in a new
thread.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NewThreadJobProcessor
public NewThreadJobProcessor()
exec
public JobMonitor<R> exec(Job<? extends R> 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