|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
oemware.core.ThreadBase
public abstract class ThreadBase
The thread base class. Extend this class for your threaded service.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
protected boolean |
mJoinThread
Set this flag to join the thread before proceeding. |
protected long |
mJoinTimeout
|
protected boolean |
mRunning
The running flag. |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
ThreadBase()
|
|
| Method Summary | |
|---|---|
protected void |
afterStart()
|
protected void |
afterStop()
|
protected void |
beforeStart()
|
protected void |
beforeStop()
|
boolean |
getJoinThread()
|
long |
getJoinTimeout()
|
boolean |
isRunning()
|
abstract void |
run()
This must be implemented for the thread to work. |
void |
setJoinThread(boolean pJoinThread)
|
void |
setJoinTimeout(long pJoinTimeout)
|
void |
shutdown()
|
void |
startup()
|
| 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 volatile boolean mRunning
protected boolean mJoinThread
protected long mJoinTimeout
| Constructor Detail |
|---|
public ThreadBase()
| Method Detail |
|---|
public abstract void run()
run in interface java.lang.Runnablerun in class java.lang.Thread
protected void beforeStart()
throws ServiceException
ServiceException
protected void afterStart()
throws ServiceException
ServiceException
protected void beforeStop()
throws ServiceException
ServiceException
protected void afterStop()
throws ServiceException
ServiceException
public void startup()
throws ServiceException
ServiceException
public void shutdown()
throws ServiceException
ServiceExceptionpublic final void setJoinThread(boolean pJoinThread)
public final boolean getJoinThread()
public final void setJoinTimeout(long pJoinTimeout)
public final long getJoinTimeout()
public final boolean isRunning()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||