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) {}
}