|
JGAP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
org.jgap.distr.grid.JGAPClient
public class JGAPClient
A client defines work for the grid and sends it to the JGAPServer. Use this class to get an idea for your grid client implementation or see the samples under package examples.grid to have templates for a) fitness computation and b) evolution on the worker side.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
protected GridNodeClientConfig |
m_gridconfig
|
protected JGAPRequest |
m_workReq
|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
JGAPClient(GridNodeClientConfig a_gridconfig,
java.lang.String a_clientClassName)
|
|
| Method Summary | |
|---|---|
protected void |
evolve(GridClient gc)
If necessary: override to implement your evolution cycle individually. |
Configuration |
getConfiguration()
|
static void |
main(java.lang.String[] args)
Starts a client (first parameter: name of specific setup class). |
protected void |
receiveWorkResults(JGAPRequest[] workList)
|
void |
run()
Threaded: Splits work, sends it to workers and receives computed solutions. |
protected void |
sendWorkRequests(JGAPRequest[] a_workList)
|
void |
setWorkRequest(JGAPRequest a_request)
|
void |
start()
|
protected GridClient |
startClient()
|
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected GridNodeClientConfig m_gridconfig
protected JGAPRequest m_workReq
| Constructor Detail |
|---|
public JGAPClient(GridNodeClientConfig a_gridconfig,
java.lang.String a_clientClassName)
throws java.lang.Exception
java.lang.Exception| Method Detail |
|---|
public void setWorkRequest(JGAPRequest a_request)
protected GridClient startClient()
throws java.lang.Exception
java.lang.Exceptionpublic void run()
run in interface java.lang.Runnablerun in class java.lang.Thread
protected void sendWorkRequests(JGAPRequest[] a_workList)
throws java.lang.Exception
java.lang.Exception
protected void receiveWorkResults(JGAPRequest[] workList)
throws java.lang.Exception
java.lang.Exception
protected void evolve(GridClient gc)
throws java.lang.Exception
gc - GridClient
java.lang.Exceptionpublic void start()
start in class java.lang.Threadpublic Configuration getConfiguration()
public static void main(java.lang.String[] args)
args - String[]
|
JGAP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||