no.ntnu.vegare.visualizer.server.background
Class GeneratorThread

java.lang.Object
  extended by 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

Constructor Summary
GeneratorThread(LogDatabase db, int perHour)
           
 
Method Summary
 boolean isRunning()
           
 void run()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeneratorThread

public GeneratorThread(LogDatabase db,
                       int perHour)
Parameters:
db - Target database
perHour - Average incidents per hour
Method Detail

isRunning

public boolean isRunning()

stop

public void stop()

run

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