|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
JR - Job result type, the (intermediate) result after starting job
executionR - The final result returned by the job after successful
termination. Usually, JR and R are
identicalJ - The job type supported by this job processorpublic interface JobProcessor<JR,R,J extends Job<? extends JR>>
The JobProcessor is a generic interface which is implemented
by different processors, which process jobs in different manners, e.g.
CurrentThreadJobProcessor)
NewThreadJobProcessor)ExecJob and ExecJobProcessor)
| Method Summary | |
|---|---|
void |
addJobTerminatedHandler(JobTerminationHandler<R> handler)
Add a job termination handler, being notified after successful or exceptional job termination |
JobMonitor<R> |
exec(J job)
Usually executes the given job and returns immediately, without waiting for completion, corresponding to Executable.exec(). |
JobResult<R> |
execAndWait(J job)
Usually executes the given job and waits for completion, corresponding to Executable.execAndWait(). |
R |
execAndWaitThrowException(J job)
|
boolean |
removeJobTerminatedHandler(JobTerminationHandler<R> handler)
Removes a job termination handler. |
| Method Detail |
|---|
void addJobTerminatedHandler(JobTerminationHandler<R> handler)
handler - the termination handler to be registeredboolean removeJobTerminatedHandler(JobTerminationHandler<R> handler)
handler - the termination handler to be unregistered
true if such a handler existed and was removedJobMonitor<R> exec(J job)
Executable.exec(). Note that the
exact behaviour is up to the implementor and might diverge from this
general description.
job - the job to execute
JobResult<R> execAndWait(J job)
throws InterruptedException
Executable.execAndWait(). Note that the exact behaviour is up to
the implementor and might diverge from this general description.
job - the job to execute
InterruptedException
R execAndWaitThrowException(J job)
throws InterruptedException,
Throwable
InterruptedException
Throwable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||