Introduced new AlignCalcWorker/manager interface.
[jalview.git] / src / jalview / api / AlignCalcManagerI.java
1 package jalview.api;
2
3 public interface AlignCalcManagerI
4 {
5
6   
7   /**
8    * tell manager that a worker is initialised and has started to run
9    * @param worker
10    */
11   void notifyStart(AlignCalcWorkerI worker);
12
13   /**
14    * check if a calculation of this type is already active
15    * @param worker
16    * @return
17    */
18   boolean alreadyDoing(AlignCalcWorkerI worker);
19
20   /**
21    * tell manager that worker is now processing data
22    * @param worker
23    */
24   void notifyWorking(AlignCalcWorkerI worker);
25
26
27   /**
28    * notify manager that the worker has completed, and results may be ready to collect
29    * @param worker
30    */
31   void workerComplete(AlignCalcWorkerI worker);
32
33   /**
34    * indicate that a worker like this cannot run on the platform and shouldn't be started again
35    * @param worker
36    */
37   void workerCannotRun(AlignCalcWorkerI worker);
38
39   /**
40    * launch a new worker
41    * @param worker
42    */
43   void startWorker(AlignCalcWorkerI worker);
44
45 }