|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
com.filenet.wcm.toolkit.server.util.WcmThread
This is a utility class designed to make launching threads easier. This class extends java.lang.Thread class and allows threads derived from this class to throw an exception when their finish() method is called. To do that, call setException() method in your run() method, and finish() method will automatically throw the exception.
Field Summary |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
WcmThread()
|
Method Summary | |
void |
finish()
Waits for the thread to finish or 15 minutes. |
static void |
finishThread(WcmThread t)
Just calls finish() method on the oThread, if it's not null. |
protected void |
setException(java.lang.Exception e)
Sets exception that will be thrown by finish() method. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setName, setPriority, 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 WcmThread()
Method Detail |
public final void finish() throws java.lang.Exception
java.lang.Exception
- if setException() method was called from inside
run() method.public static void finishThread(WcmThread t) throws java.lang.Exception
t
- WcmThread object on which to invoke finish() method.
java.lang.Exception
- if thrown by finish() method of thread tprotected final void setException(java.lang.Exception e)
e
- Exception to be thrown by finish() method.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |