JAL-3878 Add web service reference to actions.
[jalview.git] / src / jalview / ws2 / actions / api / TaskEventListener.java
index 3dda2a4..94de9d0 100644 (file)
@@ -3,7 +3,7 @@ package jalview.ws2.actions.api;
 import java.util.List;
 
 import jalview.ws2.api.JobStatus;
-import jalview.ws2.api.WebServiceJob;
+import jalview.ws2.api.WebServiceJobHandle;
 
 /**
  * The listener interface for receiving relevant job progress and state change
@@ -22,35 +22,34 @@ public interface TaskEventListener<T>
   /**
    * Invoked when the task has been started. The {@code subJobs} parameter
    * contains a complete list of sub-jobs for that run. Note that restartable
-   * tasks may invoke this method multiple times with different set of
-   * sub-jobs.
+   * tasks may invoke this method multiple times with different set of sub-jobs.
    * 
    * @param source
-   *    task this event originates from
+   *          task this event originates from
    * @param subJobs
-   *    list of sub-jobs for this run
+   *          list of sub-jobs for this run
    */
-  void taskStarted(TaskI<T> source, List<WebServiceJob> subJobs);
+  void taskStarted(TaskI<T> source, List<? extends JobI> subJobs);
 
   /**
    * Invoked when the global task status has changed.
    * 
    * @param source
-   *    task this event originates from
+   *          task this event originates from
    * @param status
-   *    new task status
+   *          new task status
    */
   void taskStatusChanged(TaskI<T> source, JobStatus status);
 
   /**
    * Invoked when the task has completed. If the task completed with a result,
-   * that result is passed in the call argument, otherwise, a {@code null}
-   * value is given.
+   * that result is passed in the call argument, otherwise, a {@code null} value
+   * is given.
    * 
    * @param source
-   *    task this event originates from
+   *          task this event originates from
    * @param result
-   *    computation result or null if result not present
+   *          computation result or null if result not present
    */
   void taskCompleted(TaskI<T> source, T result);
 
@@ -58,19 +57,19 @@ public interface TaskEventListener<T>
    * Invoked when an unhandled exception has occurred during task execution.
    * 
    * @param source
-   *    task this event originates from
+   *          task this event originates from
    * @param e
-   *    exception
+   *          exception
    */
   void taskException(TaskI<T> source, Exception e);
 
   /**
-   * Invoked when the task had been restarted. This event is only applicable
-   * to restartable tasks and will precede each {@link #taskStarted} after
-   * the first one.
+   * Invoked when the task had been restarted. This event is only applicable to
+   * restartable tasks and will precede each {@link #taskStarted} after the
+   * first one.
    * 
    * @param source
-   *    task this event originates from
+   *          task this event originates from
    */
   void taskRestarted(TaskI<T> source);
 
@@ -78,35 +77,35 @@ public interface TaskEventListener<T>
    * Invoked when the status of a sub-job has changed.
    * 
    * @param source
-   *    task this event originates form
+   *          task this event originates form
    * @param job
-   *    sub-job that has been updated
+   *          sub-job that has been updated
    * @param status
-   *    new job status
+   *          new job status
    */
-  void subJobStatusChanged(TaskI<T> source, WebServiceJob job, JobStatus status);
+  void subJobStatusChanged(TaskI<T> source, JobI job, JobStatus status);
 
   /**
    * Invoked when a log string of the sub-job has changed.
    * 
    * @param source
-   *    task this event originates form
+   *          task this event originates form
    * @param job
-   *    sub-job that has been updated
+   *          sub-job that has been updated
    * @param log
-   *    new log string
+   *          new log string
    */
-  void subJobLogChanged(TaskI<T> source, WebServiceJob job, String log);
+  void subJobLogChanged(TaskI<T> source, JobI job, String log);
 
   /**
    * Invoked when an error log string of the sub-job has changed.
    * 
    * @param source
-   *    task this event originates form
+   *          task this event originates form
    * @param job
-   *    sub-job that has been updated
+   *          sub-job that has been updated
    * @param log
-   *    new log string
+   *          new log string
    */
-  void subJobErrorLogChanged(TaskI<T> source, WebServiceJob job, String log);
+  void subJobErrorLogChanged(TaskI<T> source, JobI job, String log);
 }