edu.ntnu.item.jt.system
Class ScanResult

java.lang.Object
  extended by edu.ntnu.item.jt.system.ScanResult

public class ScanResult
extends Object

Contains a generic representation of a virus scan result. Is valid for one scan on one AVE.

Author:
Jøran Vagnby Lillesand

Constructor Summary
ScanResult(Scanner scanner)
           
 
Method Summary
 ArrayList<String> getResults()
          Get the filtered scan results for the scan.
 Scanner getScanner()
          Get the scanner used to perform this scan operation.
 long getScanTime()
          Get the total time elapsed performing the scan.
 String resultSummary()
          Generates a summarized scan result on a relatively eye-pleasing format.
 void setResult(String result)
          Set a single results.
protected  void setResults(ArrayList<String> results)
          Set results for this scan.
protected  void setScanTime(long scanTime)
          Set the scan time for this operation.
 String toString()
          Returns a thorough representation of the scan result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScanResult

public ScanResult(Scanner scanner)
Method Detail

toString

public String toString()
Returns a thorough representation of the scan result.

Overrides:
toString in class Object

resultSummary

public String resultSummary()
Generates a summarized scan result on a relatively eye-pleasing format.

Returns:
the scan result.

getResults

public ArrayList<String> getResults()
Get the filtered scan results for the scan.

Returns:
list of the scan results for this given scan.

setResults

protected void setResults(ArrayList<String> results)
Set results for this scan.

Parameters:
results - list of matches returned from the scan.

getScanTime

public long getScanTime()
Get the total time elapsed performing the scan.

Returns:
scan time in milliseconds.

setResult

public void setResult(String result)
Set a single results. Typically used for setting short, simple results, such as error messages.

Parameters:
result -

setScanTime

protected void setScanTime(long scanTime)
Set the scan time for this operation.

Parameters:
scanTime - time (in milliseconds) to perform scan.

getScanner

public Scanner getScanner()
Get the scanner used to perform this scan operation.

Returns:
scanner used to perform scan.