Package com.tagtraum.core
Class EDTWatchDog
- java.lang.Object
-
- com.tagtraum.core.EDTWatchDog
-
public class EDTWatchDog extends Object
Monitors the EDT and dumps stacktraces for all threads to the log, if it detects a hang.- Author:
- Hendrik Schreiber
-
-
Constructor Summary
Constructors Constructor Description EDTWatchDog()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static String
dumpAllStackTraces()
Dumps all stack traces into a string using info fromThread.getAllStackTraces()
.static String
dumpAllStackTracesViaMXBean()
Dumps all stack traces into a string using info fromThreadMXBean
.boolean
isEDTHanging()
boolean
isRunning()
void
start()
void
stop()
-
-
-
Method Detail
-
start
public void start()
-
isEDTHanging
public boolean isEDTHanging()
-
dumpAllStackTracesViaMXBean
public static String dumpAllStackTracesViaMXBean()
Dumps all stack traces into a string using info fromThreadMXBean
.- Returns:
- full thread dump, incl. monitor and lock info
-
dumpAllStackTraces
public static String dumpAllStackTraces()
Dumps all stack traces into a string using info fromThread.getAllStackTraces()
.- Returns:
- full thread dump, monitor/lock info is missing
-
stop
public void stop()
-
isRunning
public boolean isRunning()
-
-