public abstract class InterruptibleThread extends MustThread implements Controllable, ExemptibleManager
Modifier and Type | Field and Description |
---|---|
protected ThreadController |
threadController |
threadDoneListeners
Constructor and Description |
---|
InterruptibleThread() |
InterruptibleThread(java.lang.Runnable target) |
InterruptibleThread(java.lang.Runnable target,
java.lang.String name) |
InterruptibleThread(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
free()
Releases external resources.
|
boolean |
isToRun()
Returns true if the thread is to be continued.
|
DataObject |
register(DataObject dataObject)
Registers an object to free its external resources as soon as they are not needed any more.
|
void |
register(Exemptible exemptible)
Registers an object to free its external resources as soon as they are not needed any more.
|
void |
run() |
protected void |
runPartAfterCore() |
void |
setStatusInformation(java.lang.String statusInformation)
Sets the status information to be transfered to the user if there is a
controller for it.
|
void |
setThreadController(ThreadController threadController)
Set the thread controller.
|
addThreadDoneListener, fireThreadDone, fireThreadDone, getEventMessage, getFinalState, idle, logDebug, logError, logError, logInfo, setEventErrorMessage, setEventMessage, setFinalState
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, yield
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addThreadDoneListener, runCore, start
protected ThreadController threadController
public InterruptibleThread()
public InterruptibleThread(java.lang.String name)
public InterruptibleThread(java.lang.Runnable target)
public InterruptibleThread(java.lang.Runnable target, java.lang.String name)
public void setThreadController(ThreadController threadController)
setThreadController
in interface Controllable
threadController
- the thread controller to use.public void register(Exemptible exemptible)
ExemptibleManager
register
in interface ExemptibleManager
exemptible
- the exemptible object to registerpublic DataObject register(DataObject dataObject)
dataObject
- the data object to register to be released at a suitable later momentpublic boolean isToRun()
isToRun
in class MustThread
public void setStatusInformation(java.lang.String statusInformation)
message
- the status information for the userpublic final void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
protected void runPartAfterCore()
public void free()
ExemptibleManager
free
in interface Exemptible
free
in interface ExemptibleManager
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de