|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectno.ntnu.vegare.visualizer.server.background.ThreadPool
public class ThreadPool
Thread safe singleton implementation by Bill Pugh: http://en.wikipedia.org/wiki/Singleton_pattern
Holds all background threads in the application, and verifies that these are not interfering with each other.
Method Summary | |
---|---|
static ThreadPool |
getInstance()
|
java.lang.String |
startGenerator(LogDatabase db,
int perHour)
Start a generator thread, creating random incidents. |
java.lang.String |
startServer(LogDatabase db,
int port,
java.lang.Thread.UncaughtExceptionHandler eh)
Start a new HTTP server on a specified port. |
java.lang.String |
stopGenerator()
Stop the generator thread from executing. |
java.lang.String |
stopServer()
Stop the server from executing. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ThreadPool getInstance()
public java.lang.String startServer(LogDatabase db, int port, java.lang.Thread.UncaughtExceptionHandler eh)
db
- Database containing target incidentsport
- TCP port to run HTTP server oneh
- An UncaughtExceptionHandler which receives unexpected errors.
public java.lang.String stopServer()
public java.lang.String startGenerator(LogDatabase db, int perHour)
db
- Database to load incidents intoperHour
- Average incidents per hour
public java.lang.String stopGenerator()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |