verinec.importer.analysis.traceroute
Class TraceWorkerThread

java.lang.Object
  extended by java.lang.Thread
      extended by verinec.importer.analysis.AAnalyserTask
          extended by verinec.importer.analysis.traceroute.TraceWorkerThread
All Implemented Interfaces:
Runnable

public class TraceWorkerThread
extends AAnalyserTask

This class does the traceroutes. First a new host to trace will be get form the StartTraceRoute Object, then the trace will be done and after that the result is sent to the StartTraceRoute and the iteration starts again.

Author:
martial.seifriz at unifr.ch

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
private  boolean DEBUG
           
private  boolean doJob
          this varibale is set to true to start the traceroutes and it is set to false to stop the job
private  int hops
          the number of max hops
private  Logger log
           
private  String name
          the name of this task
private  StartTraceRoute starter
          the StartTraceRoute object, ie the caller of this thread
private  int timeOut
          the timeOut for the traceroute in ms
private  TraceRoute tr
          the traceroute object
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
TraceWorkerThread(StartTraceRoute starter, int algo, int timeOut, int hops, String name)
          The constructor just initialize the object.
 
Method Summary
 void abortOperation()
          Abort the traceroute operation.
 void addToResult(Vector hops, HostCommRenderer target)
          Save the result of a trace.
 void run()
          Run the trace route thread.
 
Methods inherited from class verinec.importer.analysis.AAnalyserTask
getStarter, printMessage, setStarter
 
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

log

private Logger log

timeOut

private int timeOut
the timeOut for the traceroute in ms


hops

private int hops
the number of max hops


name

private String name
the name of this task


starter

private StartTraceRoute starter
the StartTraceRoute object, ie the caller of this thread


tr

private TraceRoute tr
the traceroute object


DEBUG

private final boolean DEBUG
See Also:
Constant Field Values

doJob

private boolean doJob
this varibale is set to true to start the traceroutes and it is set to false to stop the job

Constructor Detail

TraceWorkerThread

public TraceWorkerThread(StartTraceRoute starter,
                         int algo,
                         int timeOut,
                         int hops,
                         String name)
                  throws TraceRouteException
The constructor just initialize the object.

Parameters:
starter - the StartTraceRoute caller
algo - the traceroute algorithm
timeOut - the timeOut of the traceroute in ms
hops - the number of max hops
name - the name of this task
Throws:
TraceRouteException
Method Detail

run

public void run()
Run the trace route thread.

Specified by:
run in interface Runnable
Overrides:
run in class Thread

abortOperation

public void abortOperation()
Abort the traceroute operation.

Specified by:
abortOperation in class AAnalyserTask

addToResult

public void addToResult(Vector hops,
                        HostCommRenderer target)
Save the result of a trace.

Parameters:
hops - a vector with the hosts, which are found.
target - the target to which the trace was done.

Copyright © 2005 Verinec, DIUF