|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
com.devexperts.qd.qtp.QTPWorkerThread
public abstract class QTPWorkerThread
Daemon worker thread that distinguished between being gracefully closed
by
its parent, or being forcefully interrupted/stopped by someone else.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
protected com.devexperts.logging.Logging |
log
|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
protected |
QTPWorkerThread(java.lang.String name)
|
Method Summary | |
---|---|
void |
close()
Marks thread as "closed" and interrupts it (if needed). |
protected abstract void |
doWork()
|
protected abstract void |
handleClose(java.lang.Throwable reason)
|
protected abstract void |
handleShutdown()
|
boolean |
isClosed()
Returns true if thread is closed and clears interrupt flag. |
void |
run()
|
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, 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, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final com.devexperts.logging.Logging log
Constructor Detail |
---|
protected QTPWorkerThread(java.lang.String name)
Method Detail |
---|
public final void close()
public final boolean isClosed() throws java.lang.InterruptedException
true
if thread is closed and clears interrupt flag.
true
if thread is closed and clears interrupt flag
java.lang.InterruptedException
- if thread is interrupted without call to close()
.public final void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
protected abstract void doWork() throws java.lang.Throwable
java.lang.Throwable
protected abstract void handleShutdown()
protected abstract void handleClose(java.lang.Throwable reason)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |