public abstract class SafeThread extends Thread implements CloseableComponent
Thread.State, Thread.UncaughtExceptionHandlerMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
SafeThread(String name,
boolean isDaemonThread) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doTerminate() |
void |
interrupt() |
boolean |
isFinished() |
boolean |
isTerminateRequested() |
void |
run() |
protected abstract void |
runInt() |
void |
terminate() |
void |
terminateAndWaitForFinish() |
void |
waitForFinish() |
void |
waitForFinish(long timeToWait) |
boolean |
wasStarted() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic SafeThread(String name, boolean isDaemonThread)
public void terminate()
terminate in interface CloseableComponentprotected void doTerminate()
public boolean isTerminateRequested()
public boolean isFinished()
public boolean wasStarted()
public void waitForFinish(long timeToWait)
public void waitForFinish()
public void terminateAndWaitForFinish()
Copyright © 2015. All rights reserved.