generating
Class TestRepeater

java.lang.Object
  extended by generating.TestRepeater
All Implemented Interfaces:
java.lang.Runnable

public class TestRepeater
extends java.lang.Object
implements java.lang.Runnable

This class is able to repeat the whole generation of a previous test by reading the log files

Author:
Majd Kokaly

Nested Class Summary
static class TestRepeater.GenerationNode
           
 
Constructor Summary
TestRepeater(java.lang.String fileName, java.util.GregorianCalendar startOfThisTest, Mapper mapper)
          A default constructor.
 
Method Summary
static java.util.GregorianCalendar convertStringToDate(java.lang.String dateString)
           
 Logger getLogger()
           
 Mapper getMapper()
           
 void insertNode(java.lang.String line)
           
 boolean isAlive()
           
static void main(java.lang.String[] args)
           
 void run()
          This thread iterates over the linked list of generation that the constructor build and generate jobs accordingly
 void setAlive(boolean alive)
           
 void setLogger(Logger logger)
           
 void setMapper(Mapper mapper)
           
 void startThread()
          This method starts this thread.
 void stopThread()
          This method stops this thread
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestRepeater

public TestRepeater(java.lang.String fileName,
                    java.util.GregorianCalendar startOfThisTest,
                    Mapper mapper)
A default constructor. This built a Linked list where every node is a generation of a job.

Parameters:
fileName - the fileName of the log file that stores the previous log of generations
startOfThisTest - the start time of test to be done
mapper - to send jobs for
Method Detail

isAlive

public boolean isAlive()

setAlive

public void setAlive(boolean alive)

getMapper

public Mapper getMapper()

setMapper

public void setMapper(Mapper mapper)

getLogger

public Logger getLogger()

setLogger

public void setLogger(Logger logger)

startThread

public void startThread()
This method starts this thread.


stopThread

public void stopThread()
This method stops this thread


run

public void run()
This thread iterates over the linked list of generation that the constructor build and generate jobs accordingly

Specified by:
run in interface java.lang.Runnable

insertNode

public void insertNode(java.lang.String line)

convertStringToDate

public static java.util.GregorianCalendar convertStringToDate(java.lang.String dateString)

main

public static void main(java.lang.String[] args)