|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Job
Base interface implemented by long-running jobs. It defines a contract between any job and the Job Manager (and indirectly the job client).
Method Summary | |
---|---|
JobStatus |
getStatus()
Returns the current job status.This method is called by the Job Manager which runs in a different thread. |
void |
run()
Starts the job. |
void |
stop()
Requests the job to stop. |
Method Detail |
---|
void run()
void stop()
The implementation is assumed to set the internal flag, in a thread-safe manner. The run() method implementation is assumed to check the flag periodically, between units of work.
If the job does not stop after configurable time interval, the Job Manager may terminate the job thread.
JobStatus getStatus()
The status object is owned by the job implementation. The run() method should update the status object in a thread-safe manner.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |