net.clackrouter.test
Class ConnectivityTestThread

java.lang.Object
  extended by java.lang.Thread
      extended by net.clackrouter.test.ConnectivityTestThread
All Implemented Interfaces:
java.lang.Runnable, ICMPListener

public class ConnectivityTestThread
extends java.lang.Thread
implements ICMPListener

This class was created to test the IP allocation portion of the Basic IP tutorial assignment.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ConnectivityTestThread(java.util.ArrayList hosts, javax.swing.JTextArea log)
           
 
Method Summary
 void killTest()
           
 void log(java.lang.String s)
           
 void receivedEchoReply(int id, int seq)
           
 void receivedEchoRequest(int id, int seq)
           
 void run()
           
 void setOutput(java.io.PrintWriter o)
           
 boolean testSuccess()
          Tells you whether last test was successfull (i.e., no failures) Will return false unless the last test fully completed
 
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
 

Constructor Detail

ConnectivityTestThread

public ConnectivityTestThread(java.util.ArrayList hosts,
                              javax.swing.JTextArea log)
Method Detail

setOutput

public void setOutput(java.io.PrintWriter o)

log

public void log(java.lang.String s)

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

testSuccess

public boolean testSuccess()
Tells you whether last test was successfull (i.e., no failures) Will return false unless the last test fully completed

Returns:

receivedEchoReply

public void receivedEchoReply(int id,
                              int seq)
Specified by:
receivedEchoReply in interface ICMPListener

receivedEchoRequest

public void receivedEchoRequest(int id,
                                int seq)
Specified by:
receivedEchoRequest in interface ICMPListener

killTest

public void killTest()