|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--webtester.packages.distributed.clientThread
Provides a thread that the client uses to ping the master server for test cases and other updates.
Field Summary | |
private static boolean |
bTestCases
Indicates if there are test cases to execute. |
private static int |
iHostPort
The port of the master server. |
private static int |
iNodeNumber
The node number assigned by the server. |
private static int |
iSleepTime
The default time to sleep in between pings to the server. |
private static int |
iSleepTime2
Default time to sleep when monitoring threads. |
private int |
iTextAreaLength
Max number of characters allowed in textarea. |
private static java.lang.String |
sHostAddr
The address of the master server. |
private static javax.swing.JTextArea |
text
Text area used to update user. |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
clientThread(java.lang.String sAddr,
int iPort,
javax.swing.JTextArea tarea)
The constructor which takes the host address and port as arguments. |
Method Summary | |
void |
getTestCases(distClient client)
Send a request to the server to retrieve test case data. |
void |
run()
|
void |
runTests(java.lang.String sConfig)
Execute the configuration returned from the server |
void |
setNodeNumber(int iNum)
Set the node number previously retrieved from the server. |
private void |
updateTextArea(java.lang.String sText)
Update the text area without erasing all existing data, if possible |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, 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 static java.lang.String sHostAddr
private static int iHostPort
private static javax.swing.JTextArea text
private static int iNodeNumber
private static final int iSleepTime
private static final int iSleepTime2
private final int iTextAreaLength
private static boolean bTestCases
Constructor Detail |
public clientThread(java.lang.String sAddr, int iPort, javax.swing.JTextArea tarea)
sAddr
- the address of the master serveriPort
- the port of the master servertarea
- text area used to update user on current client statusMethod Detail |
private void updateTextArea(java.lang.String sText)
sText
- the text to add to the text areapublic void setNodeNumber(int iNum)
iNum
- the node number assigned by the serverpublic void runTests(java.lang.String sConfig)
sConfig
- the config file returned from the serverpublic void getTestCases(distClient client)
client
- the client library used to communicate with the serverpublic void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |