org.log4jfugue
Class FileDataGetter

Gets data to process from an existing file. Uses a LogDelay class to read log4j timestamp information in the file so as to pace the reading of the file to match how it was created.

author:
btarbox

Field Summary
 String fileName
           
 Logger log
           
 LogDelay logDelay
           
 BufferedReader reader
           
 float speed
           
 
Constructor Summary
FileDataGetter()
           
 
Method Summary
void run()
           The main data gathering loop, this reads data from the data file as it is available.
void setFileDelaySpeed(float speed)
           Not yet implemented, this method will allow control of the speed of the file playback, allowing for example playing back at double the recorded speed
void setFileName(String fileName)
           Injected by Spring DI this sets the name of file to get the log data from
void setLogDelay(LogDelay logDelay)
          
void swappedIndex()
           The player has swapped index, see if we're read more than 1 second worth of data and if so wait to let the player catch up
 

Constructor Detail

FileDataGetter

FileDataGetter()


Method Detail

run

public void run()
The main data gathering loop, this reads data from the data file as it is available. After each read it calls the LogDelay method to inject the original timing to the messages


setFileDelaySpeed

public void setFileDelaySpeed(float speed)
Not yet implemented, this method will allow control of the speed of the file playback, allowing for example playing back at double the recorded speed


setFileName

public void setFileName(String fileName)
Injected by Spring DI this sets the name of file to get the log data from
param:
fileName


setLogDelay

public void setLogDelay(LogDelay logDelay)


swappedIndex

public void swappedIndex()
The player has swapped index, see if we're read more than 1 second worth of data and if so wait to let the player catch up