|
JGAP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jgap.distr.Worker
public class Worker
Worker implementation. A worker receives commands from an IMaster instance and returns results to the master. A worker can receive commands even when it is working but it can only work on one task at a time
| Constructor Summary | |
|---|---|
Worker(java.lang.String a_displayName,
MasterInfo a_master,
MasterListener a_masterListener)
Construct the worker and tell him who his master is. |
|
| Method Summary | |
|---|---|
java.lang.String |
getDisplayName()
|
java.lang.Object |
getStatus()
|
java.lang.Object |
pause()
Forces the worker to pause its work (can be resumed) |
java.lang.Object |
resume()
Forces the worker to resume a paused work |
java.lang.Object |
sendCommand(WorkerCommand a_command)
Lets a server send a command to process to the worker |
java.lang.Object |
stop()
Forces the worker to stop its work (cannot be resumed) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Worker(java.lang.String a_displayName,
MasterInfo a_master,
MasterListener a_masterListener)
a_displayName - name for imformative purposea_master - the master of this workera_masterListener - listener for requests from master| Method Detail |
|---|
public java.lang.String getDisplayName()
getDisplayName in interface IWorkerpublic java.lang.Object sendCommand(WorkerCommand a_command)
sendCommand in interface IWorkera_command - the command to process
public java.lang.Object getStatus()
getStatus in interface IWorkerpublic java.lang.Object pause()
pause in interface IWorkerpublic java.lang.Object stop()
stop in interface IWorkerpublic java.lang.Object resume()
resume in interface IWorker
|
JGAP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||