verinec.importer.analysis
Class AnalysisThread.AnalyserStatus

java.lang.Object
  extended by verinec.importer.analysis.AnalysisThread.AnalyserStatus
Enclosing class:
AnalysisThread

public class AnalysisThread.AnalyserStatus
extends Object

This Klass allows the store the actual state of the sniffing, traceroutes, host lookups and the scanning.

Author:
martial seifriz

Field Summary
private  AnalysisThread analyser
           
private  String globalState
           
(package private)  double[] lookUpHost
          The actual state of the host lookups
private  String lookUpHostState
          The actual state of the host lookups as a string to display
private  int MODE
           
(package private)  double[] scan
          The actual state of the scanning
private  String scanState
          The actual state of the scanning as a string to display
(package private)  double[][] sniffing
          The actual state of the sniffing
private  String[] sniffingState
          The actual state of the sniffing as a string to display
private  int START_TIME
           
private  int TOTAL_HOSTS
           
(package private)  double[] tr
          The actual state of the traceroutes
private  String trState
          The actual state of the traceroutes as a string to display
private  int WORKED_OFF_HOSTS
           
 
Constructor Summary
AnalysisThread.AnalyserStatus(AnalysisThread analyser)
          The constructor.
 
Method Summary
 String getState()
          Fetch the actual golbal state of the analyis process.
 void initLookUpHost()
          Prepare the host lookup state.
 void initScan(int totalHosts)
          Prepare the scanning state.
 void initSniffing(int id, int mode, long count)
          Initialize the sniffing state of a specified divice.
 void initSniffingGeneral(int totalInterfaces)
          Prepare the sniffing state.
 void initTR(int totalHosts)
          Prepare the traceroute state.
private  double myRound(double value, int scale)
          This methode allows to round a number on a specified scale.
 void setHostLookUp(String state)
          Set the actual state of the host lookups.
 void setScanState(String state)
          Set the actual state of the scanning.
 void setSniffingState(String state)
          Set the actual state of the sniffing.
 void setTRState(String state)
          Set the actual state of the traceroutes.
private  void updateGlobalState()
          Update the global state, i.e. the whole state of the analysis process, which will be displayed.
 void updateLookUpHost(int totalHosts, int workedOfHosts)
          Update the state of the host lookup.
 void updateScan()
          Update the scan State.
 void updateSniffing(int id)
          Update the sniffing state of a specified device.
 void updateTR()
          Update the actual state of the traceroutes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOTAL_HOSTS

private final int TOTAL_HOSTS
See Also:
Constant Field Values

WORKED_OFF_HOSTS

private final int WORKED_OFF_HOSTS
See Also:
Constant Field Values

START_TIME

private final int START_TIME
See Also:
Constant Field Values

MODE

private final int MODE
See Also:
Constant Field Values

analyser

private AnalysisThread analyser

globalState

private String globalState

sniffing

double[][] sniffing
The actual state of the sniffing


tr

double[] tr
The actual state of the traceroutes


scan

double[] scan
The actual state of the scanning


lookUpHost

double[] lookUpHost
The actual state of the host lookups


sniffingState

private String[] sniffingState
The actual state of the sniffing as a string to display


trState

private String trState
The actual state of the traceroutes as a string to display


scanState

private String scanState
The actual state of the scanning as a string to display


lookUpHostState

private String lookUpHostState
The actual state of the host lookups as a string to display

Constructor Detail

AnalysisThread.AnalyserStatus

public AnalysisThread.AnalyserStatus(AnalysisThread analyser)
The constructor.

Parameters:
analyser - The AnalysisThread, which calls this constructor.
Method Detail

initSniffingGeneral

public void initSniffingGeneral(int totalInterfaces)
Prepare the sniffing state.

Parameters:
totalInterfaces -

initSniffing

public void initSniffing(int id,
                         int mode,
                         long count)
Initialize the sniffing state of a specified divice.

Parameters:
id - The specified device, on which the sniffer is running.
mode - The mode, which is used, i.e. a number of packages or a time interval.
count - The final number or time which should be reached.

updateSniffing

public void updateSniffing(int id)
Update the sniffing state of a specified device.

Parameters:
id - The ID of the specified device.

setSniffingState

public void setSniffingState(String state)
Set the actual state of the sniffing.

Parameters:
state - The state so set.

initTR

public void initTR(int totalHosts)
Prepare the traceroute state.

Parameters:
totalHosts - The number of hosts, which should be traced.

updateTR

public void updateTR()
Update the actual state of the traceroutes.


setTRState

public void setTRState(String state)
Set the actual state of the traceroutes.

Parameters:
state - The state so set.

initScan

public void initScan(int totalHosts)
Prepare the scanning state.

Parameters:
totalHosts - The number of hosts, which should be scanned.

updateScan

public void updateScan()
Update the scan State.


setScanState

public void setScanState(String state)
Set the actual state of the scanning.

Parameters:
state - The state so set.

initLookUpHost

public void initLookUpHost()
Prepare the host lookup state.


updateLookUpHost

public void updateLookUpHost(int totalHosts,
                             int workedOfHosts)
Update the state of the host lookup.

Parameters:
totalHosts -
workedOfHosts -

setHostLookUp

public void setHostLookUp(String state)
Set the actual state of the host lookups.

Parameters:
state - The state so set.

updateGlobalState

private void updateGlobalState()
Update the global state, i.e. the whole state of the analysis process, which will be displayed.


getState

public String getState()
Fetch the actual golbal state of the analyis process.

Returns:
The actual golbal state of the analyis process.

myRound

private double myRound(double value,
                       int scale)
This methode allows to round a number on a specified scale.

Parameters:
value - The number to round.
scale - The scale which sould be used.
Returns:
The rounded number.

Copyright © 2005 Verinec, DIUF