org.log4jfugue
Class FileDataGetter

java.lang.Object
  extended by java.lang.Thread
      extended by org.log4jfugue.SimpleDataGetter
          extended by org.log4jfugue.FileDataGetter
All Implemented Interfaces:
java.lang.Runnable

public class FileDataGetter
extends SimpleDataGetter

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

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
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(java.lang.String fileName)
          Injected by Spring DI this sets the name of file to get the log data from
 void setLogDelay(org.log4jfugue.LogDelay logDelay)
           
 
Methods inherited from class org.log4jfugue.SimpleDataGetter
setReader, setWriter
 
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileDataGetter

public FileDataGetter()
Method Detail

setFileName

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

Parameters:
fileName -

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


setLogDelay

public void setLogDelay(org.log4jfugue.LogDelay logDelay)

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

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class SimpleDataGetter