|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectjava.lang.Thread
org.mmbase.core.util.DaemonThread
ThreadPools.scheduler). If scheduling is not used, then only the
thread group is special, which can just as well be obtained by MMBaseContext.getThreadGroup().
public class DaemonThread
Defines a daemon thread that runs in the threadgroup belonging to this MMBase context.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
static int |
DEFAULT_SLEEP_PERIOD
Deprecated. Default sleep period for a daemon thread (one minute). |
protected int |
sleepPeriod
Deprecated. The threads sleep period. |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
DaemonThread()
Deprecated. Create a MMBase daemon thread (associated with this MMBase's threadgroup). |
|
DaemonThread(Runnable target,
String name)
Deprecated. Create a MMBase daemon thread (associated with this MMBase's threadgroup). |
|
DaemonThread(String name)
Deprecated. Create a MMBase daemon thread (associated with this MMBase's threadgroup). |
|
| Method Summary | |
|---|---|
void |
executeTask()
Deprecated. Defines a task that need be run by a daemon thread's run() method. |
int |
getSleepPeriod()
Deprecated. Returns this task's sleep period. |
DaemonTask |
getTask()
Deprecated. Returns the task this thread runs when started. |
void |
interrupt()
Deprecated. |
boolean |
isRunning()
Deprecated. |
void |
run()
Deprecated. Default behavior (when no target is specified) is to run continuously until interrupted. |
void |
setTask(DaemonTask task)
Deprecated. Sets the task this thread should run when started. |
void |
start()
Deprecated. |
| 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, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_SLEEP_PERIOD
protected int sleepPeriod
| Constructor Detail |
|---|
public DaemonThread()
public DaemonThread(String name)
name - the name of the thread
public DaemonThread(Runnable target,
String name)
target - the target threadname - the name of the thread| Method Detail |
|---|
public void setTask(DaemonTask task)
task - the task to runpublic DaemonTask getTask()
public int getSleepPeriod()
DaemonTask
getSleepPeriod in interface DaemonTaskpublic void start()
start in class Threadpublic void interrupt()
interrupt in class Threadpublic boolean isRunning()
public void executeTask()
DaemonTask
executeTask in interface DaemonTaskpublic void run()
run in interface Runnablerun in class Thread
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||