vanetsim.gui.helpers
Class LogOperations

java.lang.Object
  extended by java.lang.Thread
      extended by vanetsim.gui.helpers.LogOperations
All Implemented Interfaces:
java.lang.Runnable

public class LogOperations
extends java.lang.Thread


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
LogOperations(LogAnalyser logAnalyser)
           
 
Method Summary
 void advancedAttackMixZones()
          Advanced attack for mix-zones
 void advancedAttackSilentPeriod()
          advanced attack for silent periods
 java.lang.Object[] getDataOfMixZoneLog(java.lang.String[] file, java.lang.String mixNodeID, int totalNumberOfAnalysedZones)
          Analyze traffic data to get information for an attack (for a mix node
 float[] getKAnonymityInMix(java.lang.String theNodeID, java.lang.String log)
          return k-anonymity of a mix log (for a chosen node id)
 int getNodeRadius(java.lang.String nodeID, java.lang.String header)
          return the radius of a node written in the header of a log file
 java.lang.String getOperation()
           
 java.lang.String readFile(java.lang.String filePath)
          Method to read a file
 java.lang.String[] readFileAndHeader(java.lang.String filePath)
          Method to read a file.
 java.lang.String readFileWithoutHeader(java.lang.String filePath)
          Method to read a file without the header of the log
 void run()
           
 void setOperation(java.lang.String operation)
           
 void standardAttackMixZones()
          Standard attack for mix-zones
 void standardAttackSilentPeriod()
           
 void writeLocationInformationToFile(java.lang.String header, boolean append)
          Writes advanced analyzed information to a file
 
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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LogOperations

public LogOperations(LogAnalyser logAnalyser)
Method Detail

run

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

standardAttackMixZones

public void standardAttackMixZones()
Standard attack for mix-zones


advancedAttackMixZones

public void advancedAttackMixZones()
Advanced attack for mix-zones


standardAttackSilentPeriod

public void standardAttackSilentPeriod()

advancedAttackSilentPeriod

public void advancedAttackSilentPeriod()
advanced attack for silent periods


getNodeRadius

public int getNodeRadius(java.lang.String nodeID,
                         java.lang.String header)
return the radius of a node written in the header of a log file


getKAnonymityInMix

public float[] getKAnonymityInMix(java.lang.String theNodeID,
                                  java.lang.String log)
return k-anonymity of a mix log (for a chosen node id)


readFile

public java.lang.String readFile(java.lang.String filePath)
Method to read a file


readFileAndHeader

public java.lang.String[] readFileAndHeader(java.lang.String filePath)
Method to read a file. Reads a file and returns the header and the content split in an String array


readFileWithoutHeader

public java.lang.String readFileWithoutHeader(java.lang.String filePath)
Method to read a file without the header of the log


getDataOfMixZoneLog

public java.lang.Object[] getDataOfMixZoneLog(java.lang.String[] file,
                                              java.lang.String mixNodeID,
                                              int totalNumberOfAnalysedZones)
Analyze traffic data to get information for an attack (for a mix node


getOperation

public java.lang.String getOperation()

setOperation

public void setOperation(java.lang.String operation)

writeLocationInformationToFile

public void writeLocationInformationToFile(java.lang.String header,
                                           boolean append)
Writes advanced analyzed information to a file