01: package org.swingml.task;
02:
03: import org.swingml.task.monitoring.*;
04:
05: /**
06: * @author CrossLogic
07: */
08: public interface ITask {
09:
10: void addPostExecuteTask(ITask task);
11:
12: void addPreExecuteTask(ITask task);
13:
14: void addTaskMonitor(ITaskMonitor aMonitor);
15:
16: Object execute();
17:
18: String getName();
19:
20: int getStatus();
21:
22: /**
23: * The number of steps to perform to complete this task only.
24: */
25: int getSteps();
26:
27: /**
28: * The number of steps to perform to complete this task and all pre/post
29: * tasks.
30: */
31: int getTotalStepCount();
32:
33: Object onComplete(Object result);
34:
35: void removeTaskMonitor(ITaskMonitor aMonitor);
36:
37: }
|