verinec.importer.analysis
Class AAnalyserStartOperation

java.lang.Object
  extended by verinec.importer.analysis.AAnalyserStartOperation
All Implemented Interfaces:
IOperation
Direct Known Subclasses:
StartScan, StartSniffer, StartTraceRoute

public abstract class AAnalyserStartOperation
extends Object
implements IOperation

This class conatains contains the common methods of the starter. Specialy some methods to control the task like start and abort them.

Author:
martial.seifriz at unifr.ch

Field Summary
protected  AnalysisThread analyser
          The AnalysisThread which creates a AAnalyserStartOperation
private  AAnalyserTask[] threads
          An array of the threads which are working for a Starter eg. the SnifferThrads
 
Constructor Summary
AAnalyserStartOperation(AnalysisThread analyser, int parallels)
          Initialise the operation starter.
 
Method Summary
 void abortOperation()
          Tell all thrads to stop their current work.
 AAnalyserTask getThread(int i)
          Get a AAnalyserTask from the threads-array.
 void joinThreads()
          Join all threads of the threads-array
 void printMessage(String message)
          Print a message, eg on the standart output or in the gui.
 void setThread(int i, AAnalyserTask thread)
          Set a specified thread.
 void startThreads()
          Start all threads of the threads-array
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

analyser

protected AnalysisThread analyser
The AnalysisThread which creates a AAnalyserStartOperation


threads

private AAnalyserTask[] threads
An array of the threads which are working for a Starter eg. the SnifferThrads

Constructor Detail

AAnalyserStartOperation

public AAnalyserStartOperation(AnalysisThread analyser,
                               int parallels)
Initialise the operation starter.

Parameters:
analyser - The AnalysisThread which holds this AAnalyserStartOperation
parallels - The number of parallel threads to prepare.
Method Detail

setThread

public void setThread(int i,
                      AAnalyserTask thread)
Set a specified thread.

Parameters:
i - the index in the threads-array, on which the thread should be placed.
thread - the AAnalyserTask object which sould be stored.

getThread

public AAnalyserTask getThread(int i)
Get a AAnalyserTask from the threads-array.

Parameters:
i - The specified identifier of the AAnalyserTask.
Returns:
The searched AAnalyserTask

startThreads

public void startThreads()
Start all threads of the threads-array


joinThreads

public void joinThreads()
Join all threads of the threads-array


abortOperation

public void abortOperation()
Tell all thrads to stop their current work.

Specified by:
abortOperation in interface IOperation

printMessage

public void printMessage(String message)
Print a message, eg on the standart output or in the gui.

Parameters:
message - The message to print.

Copyright © 2005 Verinec, DIUF