no.ntnu.vegare.visualizer.server.background
Class GeneratorThread
java.lang.Object
no.ntnu.vegare.visualizer.server.background.GeneratorThread
- All Implemented Interfaces:
- java.lang.Runnable
public class GeneratorThread
- extends java.lang.Object
- implements java.lang.Runnable
The generator thread runs in the background, where it generates random
incidents. This is obviously for prototype purposes only.
Notice that the number of incidents per hour is an average, and that
randomness is used to avoid too frequent updates.
- Author:
- vegare
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GeneratorThread
public GeneratorThread(LogDatabase db,
int perHour)
- Parameters:
db
- Target databaseperHour
- Average incidents per hour
isRunning
public boolean isRunning()
stop
public void stop()
run
public void run()
- Specified by:
run
in interface java.lang.Runnable