From 80eb92f9482301dea5b66a9c6b77f07552a76304 Mon Sep 17 00:00:00 2001 From: Mateusz Waronwy Date: Wed, 21 Oct 2020 16:18:05 +0200 Subject: [PATCH] JAL-3690 Documentation for AlignCalcListener --- src/jalview/api/AlignCalcListener.java | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) 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) {} } -- 1.7.10.2