JAL-4199 Replace AbstractPollingTask with BaseTask
[jalview.git] / src / jalview / ws2 / actions / api / TaskI.java
index cb84944..5f4d575 100644 (file)
@@ -38,6 +38,10 @@ public interface TaskI<T>
    */
   List<? extends JobI> getSubJobs();
 
+  void addTaskEventListener(TaskEventListener<T> listener);
+
+  void removeTaskEventListener(TaskEventListener<T> listener);
+
   /**
    * Get the last result of the task or {@code null} if not present. Note that
    * the result is subject to change for restartable tasks.
@@ -46,6 +50,12 @@ public interface TaskI<T>
    */
   T getResult();
 
+  public void init() throws Exception;
+
+  public boolean poll() throws Exception;
+
+  public void complete() throws Exception;
+
   /**
    * Cancel the task, stop all sub-jobs running on a server and stop all threads
    * managing this task.