|
Knopflerfish OSGi 2.4.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.knopflerfish.util.workerthread.WorkerThread
public class WorkerThread
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
WorkerThread()
Creates a Workerthread. |
|
WorkerThread(java.lang.String name)
Creates a named Workerthread. |
|
WorkerThread(java.lang.ThreadGroup group,
java.lang.String name)
Creates a named Workerthread belonging toi the specified ThreadGroup. |
Method Summary | |
---|---|
void |
addJob(Job job)
Adds a job to be processed last in the job queue. |
void |
addJob(Job job,
long delayMillis)
Adds a job to be processed after given delay. |
boolean |
isRunning()
Returns true if this Workerthread is running. |
protected void |
postMainLoopHook()
Override this method in subclasses. |
protected void |
preMainLoopHook()
Override this method in subclasses. |
void |
removeJob(Job job)
Removes a job from the job queue (linear-time operation). |
void |
run()
|
void |
shutdown()
Call this method to stop job processing and cause this Workerthread to exit its run() method. |
protected void |
status(java.lang.String msg,
Job job,
java.lang.Exception e)
|
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 |
Constructor Detail |
---|
public WorkerThread()
public WorkerThread(java.lang.String name)
public WorkerThread(java.lang.ThreadGroup group, java.lang.String name)
Method Detail |
---|
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
protected void preMainLoopHook()
protected void postMainLoopHook()
public void shutdown()
public boolean isRunning()
public void addJob(Job job)
public void addJob(Job job, long delayMillis)
delayMillis
milliseconds has passed, the job will be
placed last in the job queue.
public void removeJob(Job job)
protected void status(java.lang.String msg, Job job, java.lang.Exception e)
|
Knopflerfish OSGi 2.4.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |