From: Mateusz Waronwy Date: Wed, 21 Oct 2020 14:18:05 +0000 (+0200) Subject: JAL-3690 Documentation for AlignCalcListener X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=80eb92f9482301dea5b66a9c6b77f07552a76304;p=jalview.git JAL-3690 Documentation for AlignCalcListener --- diff --git a/src/jalview/api/AlignCalcListener.java b/src/jalview/api/AlignCalcListener.java index 2e40f87..9ce385d 100644 --- a/src/jalview/api/AlignCalcListener.java +++ b/src/jalview/api/AlignCalcListener.java @@ -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) {} }