1 package jalview.ws2.actions.api;
5 import jalview.viewmodel.AlignmentViewport;
6 import jalview.ws2.api.JobStatus;
7 import jalview.ws2.api.WebServiceJobHandle;
10 * {@code TaskI} objects represent running services. Tasks are created by
11 * concrete implementations of {@link ActionI} and provide a view of the state
12 * of the underlying job(s).
19 public interface TaskI<T>
22 * Get the current status of the task. The resultant status should be a
23 * combination of individual sub-job statuses.
25 * @return global status of
27 JobStatus getStatus();
30 * Get the current list of sub-jobs of that task.
34 List<? extends JobI> getSubJobs();
37 * Get the last result of the task or {@code null} if not present. Note that
38 * the result is subject to change for restartable tasks.
40 * @return last task result
45 * Cancel the task, stop all sub-jobs running on a server and stop all threads