KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jgap > distr > IWorker


1 /*
2  * This file is part of JGAP.
3  *
4  * JGAP offers a dual license model containing the LGPL as well as the MPL.
5  *
6  * For licencing information please see the file license.txt included with JGAP
7  * or have a look at the top of class org.jgap.Chromosome which representatively
8  * includes the JGAP license policy applicable for any file delivered with JGAP.
9  */

10 package org.jgap.distr;
11
12 /**
13  * Interface for workers processing requests from an IMaster instance.
14  *
15  * @author Klaus Meffert
16  * @since 2.4
17  */

18 public interface IWorker {
19   /** String containing the CVS revision. Read out via reflection!*/
20   final static String JavaDoc CVS_REVISION = "$Revision: 1.4 $";
21
22   /**
23    * @return display name of the worker
24    *
25    * @author Klaus Meffert
26    * @since 2.4
27    */

28   String JavaDoc getDisplayName();
29
30   /**
31    * @return current status of the entity
32    *
33    * @author Klaus Meffert
34    * @since 2.4
35    */

36   Object JavaDoc getStatus();
37
38   /**
39    * Forces the worker to pause its work (can be resumed)
40    * @return status message
41    *
42    * @author Klaus Meffert
43    * @since 2.4
44    */

45   Object JavaDoc pause();
46
47   /**
48    * Forces the worker to stop its work (cannot be resumed)
49    * @return status message
50    *
51    * @author Klaus Meffert
52    * @since 2.4
53    */

54   Object JavaDoc stop();
55
56   /**
57    * Forces the worker to resume a paused work
58    * @return status message
59    *
60    * @author Klaus Meffert
61    * @since 2.4
62    */

63   Object JavaDoc resume();
64
65   /**
66    * Lets a server send a command to process to the worker
67    * @param a_command the command to process
68    * @return status message
69    *
70    * @author Klaus Meffert
71    * @since 2.4
72    */

73   Object JavaDoc sendCommand(WorkerCommand a_command);
74 }
75
Popular Tags