JAL-3690 Documentation for AlignCalcListener
authorMateusz Waronwy <mmzwarowny@dundee.ac.uk>
Wed, 21 Oct 2020 14:18:05 +0000 (16:18 +0200)
committerMateusz Waronwy <mmzwarowny@dundee.ac.uk>
Wed, 21 Oct 2020 14:18:05 +0000 (16:18 +0200)
src/jalview/api/AlignCalcListener.java

index 2e40f87..9ce385d 100644 (file)
@@ -2,11 +2,38 @@ package jalview.api;
 
 import java.util.EventListener;
 
+/**
+ * A listener class which receives state updates of {@link AlignCalcWorkerI}.
+ * It can be registered with an {@link AlignCalcManagerI2}.
+ * 
+ * @author mmwarowny
+ *
+ */
 public interface AlignCalcListener extends EventListener
 {
+  /**
+   * Called when the worker is scheduler for execution with
+   * {@link AlignCalcManagerI2#startWorker(AlignCalcWorkerI)}.
+   */
   default void workerQueued(AlignCalcWorkerI worker) {}
+  
+  /**
+   * Called when the worker starts calculations.
+   */
   default void workerStarted(AlignCalcWorkerI worker) {}
+  
+  /**
+   * Called when the worker finishes successfully.
+   */
   default void workerCompleted(AlignCalcWorkerI worker) {}
+  
+  /**
+   * Called when the worker is cancelled.
+   */
   default void workerCancelled(AlignCalcWorkerI worker) {}
+  
+  /**
+   * Called when the worker finishes with an exception.
+   */
   default void workerExceptional(AlignCalcWorkerI worker, Throwable throwable) {}
 }