AsyncTaskSvc
Method Summary |
public void |
|
public void |
|
public void |
|
public void |
|
public void |
|
public void |
|
Method Detail |
public void addTask(IAsyncTask
task)
Adds the given task to the queue for processing. This task will be interrupted
if the active workspace closes.
Related Topics
public void addTask(IAsyncTask
task,
int threadPriority)
Adds the given task to the queue for processing. This version allows setting the priority of the background
thread. Note that threadPriority in no way affects the execution order. This task will be interrupted
if the active workspace closes.
Related Topics
public void addTask(IAsyncTask
task,
int threadPriority,
boolean interruptOnWorkspaceClose)
Adds the given task to the queue for processing. This version allows setting the priority of the background
thread. Note that threadPriority in no way affects the execution order.
Related Topics
public void interruptTask(IAsyncTask
task)
Interrupt the processing of the given task. If this task has
not started executing, then it will not be executed. If it
has started executing, then it's thread will be interrupted.
The task is allowed to throw an AsyncTaskInterruptedException
in order to cause its execution to terminate.
public void showDialogWhileRunning(Runs the given job on a background thread, while blocking the AWT thread until either the job is performed or the delay is reached. If the delay is reached before the job finishes, a dialog is displayed with the message passed in, which allows the AWT thread to perform other work while the job is completed.String
message, int timeoutBeforeReturn,Runnable
runnable)
throwsInterruptedException
After the dialog is displayed, the job will be given the timeout period to finish running. At that point, if the job is not finished, the dialog will be cleared, and this method will return false.
This method is only truly useful if called on the AWT thread. If called on a different thread, it simply runs the job directly with no timeout or dialog.
InterruptedException
public void showDialogWhileRunning(Convenience method for use if the dialog should never time out.String
message,Runnable
runnable)