public class DumpingThread extends Thread
Thread that catches throws exceptions and dumps them
to the logfile.Thread.State, Thread.UncaughtExceptionHandlerMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
DumpingThread(Runnable runnable)
Creates a new dumping thread that executes the given
Runnable. |
DumpingThread(Runnable runnable,
String name)
Creates a new dumping thread that executes the given
Runnable in
a thread with the given name. |
DumpingThread(Runnable runnable,
String name,
boolean logThreadStartAndEnd)
Creates a new dumping thread that executes the given
Runnable in
a thread with the given name. |
| Modifier and Type | Method and Description |
|---|---|
void |
run()
Executes the runnable in a try-catch block and dumps the thrown exception
to the
logger. |
void |
setLogThreadStartAndEnd(boolean logThreadStartAndEnd)
Sets whether the started thread should logs its start and end.
|
activeCount, checkAccess, clone, 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, yieldpublic DumpingThread(Runnable runnable)
Runnable.runnable - The Runnable to executepublic DumpingThread(Runnable runnable, String name)
Runnable in
a thread with the given name.runnable - The Runnable to executename - The name of the threadpublic DumpingThread(Runnable runnable, String name, boolean logThreadStartAndEnd)
Runnable in
a thread with the given name.runnable - The Runnable to executename - The name of the threadlogThreadStartAndEnd - true if the thread should log its start and endCopyright © 2026. All rights reserved.