|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread com.lti.utils.synchronization.CloseableThread com.lti.utils.synchronization.MessageDrivenThread
public class MessageDrivenThread
A useful base class for a thread that wishes to simply respond to messages.
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 com.lti.utils.synchronization.CloseableThread |
---|
closing |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
MessageDrivenThread(java.lang.ThreadGroup group,
java.lang.String threadName)
|
|
MessageDrivenThread(java.lang.ThreadGroup group,
java.lang.String threadName,
MessageDrivenThreadListener listener)
|
Method Summary | |
---|---|
protected void |
doMessageReceived(java.lang.Object o)
subclass should override to do message processing. |
void |
post(java.lang.Object msg)
|
void |
run()
|
void |
setListener(MessageDrivenThreadListener listener)
|
Methods inherited from class com.lti.utils.synchronization.CloseableThread |
---|
close, isClosed, isClosing, setClosed, setClosing, waitUntilClosed |
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 MessageDrivenThread(java.lang.ThreadGroup group, java.lang.String threadName, MessageDrivenThreadListener listener)
public MessageDrivenThread(java.lang.ThreadGroup group, java.lang.String threadName)
Method Detail |
---|
public void setListener(MessageDrivenThreadListener listener)
public void post(java.lang.Object msg) throws java.lang.InterruptedException
java.lang.InterruptedException
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
protected void doMessageReceived(java.lang.Object o)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |