1
2
3
4 package ca.spaz.task;
5
6 public interface Task extends Runnable {
7
8 /***
9 * A number between 0 and 100 representing the
10 * % completion of the task.
11 *
12 * @return the percentage complete
13 */
14 public int getTaskProgress();
15
16 /***
17 * The task has been cancelled. Attempt to stop.
18 */
19 public void abortTask();
20
21 /***
22 * Return true if the program can finish.
23 *
24 * @return true if the task can be aborted.
25 */
26 public boolean canAbortTask();
27
28 /***
29 * A description of the current Task being performed
30 *
31 * @return the description of the current Task being performed
32 */
33 public String getTaskDescription();
34
35 }