|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--jde.debugger.EventHandler
Each Debugger has an event handler thread on the jdebug side associated with it that receives all the events from the debugee vm. In turn, the event handler thread passes the events on to the jde, indicating if the vm/current thread was suspended.
Created: Tue Jul 6 14:08:44 1999
Debugger
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
EventHandler(Debugger debugger)
|
Method Summary | |
void |
run()
The thread reads an eventset at a time from the application queue, and processes it. |
void |
shutdown()
Indicates that the thread executing the event handling should stop as the first opportunity. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, 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 EventHandler(Debugger debugger)
Method Detail |
public void shutdown()
public void run()
First, it notifies all EventSetListener
that an
event set has arrived. The listeners can set a flag in the event
to indicate if the JVM should be resumed. The old method of
setting the resumeApp variable is also supported for the old
code.
Next, all listeners are again notified whether we are suspending or resuming the JVM. If we are resuming the JVM, the listener registered in this class' constructor does the resume, so all other listeners will be notified after the JVM has been resumed. This two-tier suspend-policy handling might be simplified to some extent once all commands support setting of a suspend policy, with that and that alone being used to decide on what to do with the vm.
A problem with that approach is that since we do a second pass on the events when we get the eventset to determine if the events should be sent to the user (eg. a breakpoint-hit is still not interesting if it doesn't occur on the "right" thread), the latter approach might not work well at all.
run
in class java.lang.Thread
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |