|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
gui.TSPModelConnectThread
class TSPModelConnectThread
Class to communicate with the thread on the compute server.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
private int |
algo
|
private ChannelFactory |
cf
|
private SocketChannel |
comm
|
private int |
guiClientPort
|
private java.lang.String |
guiHost
|
private int |
guiPort
|
private boolean |
isBestPath
|
private long |
iter
|
private long |
maxIter
|
private long |
maxIterTemp
|
private TSPguiModel |
model
|
private int |
numThread
|
private Path |
path
|
private Point[] |
points
|
private ThreadPool |
pool
|
private int |
port
|
private java.lang.String |
server
|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
TSPModelConnectThread(Point[] points,
int algo,
int threads,
long mit,
java.lang.String server,
int port,
TSPguiModel model)
|
Method Summary | |
---|---|
Path |
getActualBestPath()
|
Path |
getBestPath()
|
long |
getIterations()
|
long |
getMaxIterations()
|
boolean |
isBestPath()
|
boolean |
isRunning()
|
void |
run()
|
protected java.lang.Object |
sendReceive(TransportContainer m)
RPC style communication. |
long |
setMaxIterations(long m)
|
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, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private Point[] points
private Path path
private int numThread
private int algo
private long iter
private long maxIter
private long maxIterTemp
private boolean isBestPath
private java.lang.String server
private int port
private java.lang.String guiHost
private int guiPort
private int guiClientPort
private TSPguiModel model
private ChannelFactory cf
private SocketChannel comm
private ThreadPool pool
Constructor Detail |
---|
public TSPModelConnectThread(Point[] points, int algo, int threads, long mit, java.lang.String server, int port, TSPguiModel model)
points
- array city coordinates.algo
- algorithm to use.threads
- number of thread to use.mit
- maximal iteration count.server
- host name of compute server.port
- of compute server.model
- the TSPguiModel.Method Detail |
---|
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public boolean isRunning()
public boolean isBestPath()
public long getIterations()
public Path getActualBestPath()
public Path getBestPath()
public long getMaxIterations()
public long setMaxIterations(long m)
m
- new maximal iteration count.
protected java.lang.Object sendReceive(TransportContainer m)
m
- a TransportContainer.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |