01: /*
02: * This file is part of JGAP.
03: *
04: * JGAP offers a dual license model containing the LGPL as well as the MPL.
05: *
06: * For licensing information please see the file license.txt included with JGAP
07: * or have a look at the top of class org.jgap.Chromosome which representatively
08: * includes the JGAP license policy applicable for any file delivered with JGAP.
09: */
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 CVS_REVISION = "$Revision: 1.5 $";
21:
22: /**
23: * @return display name of the worker
24: *
25: * @author Klaus Meffert
26: * @since 2.4
27: */
28: String getDisplayName();
29:
30: /**
31: * @return current status of the entity
32: *
33: * @author Klaus Meffert
34: * @since 2.4
35: */
36: Object 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 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 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 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 sendCommand(WorkerCommand a_command);
74: }
|