|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
ptolemy.kernel.util.PtolemyThread
public class PtolemyThread
PtolemyThread PtolemyThread extends Thread by adding rudimentary debugging capability.
Green (liuj) |
Green (lmuliadi) |
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
protected boolean |
_debugging
Flag that is true if there are debug listeners. |
protected java.util.LinkedList |
_debugListeners
The list of DebugListeners registered with this object. |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
PtolemyThread()
Construct a new PtolemyThread object. |
|
PtolemyThread(java.lang.Runnable target)
Construct a new PtolemyThread object. |
|
PtolemyThread(java.lang.Runnable target,
java.lang.String name)
Construct a new PtolemyThread object. |
|
PtolemyThread(java.lang.String name)
Construct a new PtolemyThread object. |
|
PtolemyThread(java.lang.ThreadGroup group,
java.lang.Runnable target)
Construct a new PtolemyThread object. |
|
PtolemyThread(java.lang.ThreadGroup group,
java.lang.Runnable target,
java.lang.String name)
Construct a new PtolemyThread object so that it has target as its run object, has the specified name as its name, and belongs to the thread group referred to by group. |
|
PtolemyThread(java.lang.ThreadGroup group,
java.lang.String name)
Construct a new PtolemyThread object. |
Method Summary | |
---|---|
protected void |
_debug(DebugEvent event)
Send a debug event to all debug listeners that have registered. |
protected void |
_debug(java.lang.String message)
Send a debug message to all debug listeners that have registered. |
void |
addDebugListener(DebugListener listener)
Append a listener to the current set of debug listeners. |
void |
removeDebugListener(DebugListener listener)
Unregister a debug listener. |
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, run, 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 _debugging
protected java.util.LinkedList _debugListeners
Constructor Detail |
---|
public PtolemyThread()
public PtolemyThread(java.lang.Runnable target)
target
- The object whose run method is called.public PtolemyThread(java.lang.Runnable target, java.lang.String name)
target
- The object whose run method is called.name
- The name of the new thread.public PtolemyThread(java.lang.String name)
name
- The name of the new thread.public PtolemyThread(java.lang.ThreadGroup group, java.lang.Runnable target)
group
- The thread grouptarget
- The object whose run method is called.public PtolemyThread(java.lang.ThreadGroup group, java.lang.Runnable target, java.lang.String name)
group
- The thread group.target
- The object whose run method is called.name
- The name of the new thread.
java.lang.SecurityException
- If the superclass constructor throws it.public PtolemyThread(java.lang.ThreadGroup group, java.lang.String name)
group
- The thread group.name
- The name of the new thread.Method Detail |
---|
public void addDebugListener(DebugListener listener)
addDebugListener
in interface Debuggable
listener
- The listener to which to send debug messages.removeDebugListener(DebugListener)
public void removeDebugListener(DebugListener listener)
removeDebugListener
in interface Debuggable
listener
- The listener to remove from the list of listeners
to which debug messages are sent.addDebugListener(DebugListener)
protected final void _debug(DebugEvent event)
event
- The event.protected final void _debug(java.lang.String message)
message
- The message.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |