edu.rice.cs.drjava.model.debug
Class EventHandler

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--edu.rice.cs.drjava.model.debug.EventHandler
All Implemented Interfaces:
Runnable

public class EventHandler
extends Thread


Field Summary
private  boolean _connected
           
private  DebugManager _manager
           
private  com.sun.jdi.VirtualMachine _vm
           
 
Fields inherited from class java.lang.Thread
contextClassLoader, daemon, eetop, group, inheritableThreadLocals, inheritedAccessControlContext, MAX_PRIORITY, MIN_PRIORITY, name, NORM_PRIORITY, priority, single_step, stillborn, stopThreadPermission, target, threadInitNumber, threadLocals, threadQ
 
Constructor Summary
(package private) EventHandler(DebugManager manager, com.sun.jdi.VirtualMachine vm)
           
 
Method Summary
private  void _cleanUp(com.sun.jdi.event.Event e)
           
private  void _handleBreakpointEvent(com.sun.jdi.event.BreakpointEvent e)
           
private  void _handleClassPrepareEvent(com.sun.jdi.event.ClassPrepareEvent e)
           
private  void _handleModificationWatchpointEvent(com.sun.jdi.event.ModificationWatchpointEvent e)
           
private  void _handleStepEvent(com.sun.jdi.event.StepEvent e)
           
private  void _handleThreadDeathEvent(com.sun.jdi.event.ThreadDeathEvent e)
           
private  void _handleVMDeathEvent(com.sun.jdi.event.VMDeathEvent e)
           
private  void _handleVMDisconnectEvent(com.sun.jdi.event.VMDisconnectEvent e)
           
(package private)  void handleDisconnectedException()
          A VMDisconnectedException has happened while dealing with another event.
 void handleEvent(com.sun.jdi.event.Event e)
           
 void run()
           
 
Methods inherited from class java.lang.Thread
, activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, exit, getContextClassLoader, getName, getPriority, getThreadGroup, init, interrupt, interrupt0, interrupted, isAlive, isDaemon, isInterrupted, isInterrupted, join, join, join, nextThreadNum, registerNatives, resume, resume0, setContextClassLoader, setDaemon, setName, setPriority, setPriority0, sleep, sleep, start, stop, stop, stop0, suspend, suspend0, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_manager

private DebugManager _manager

_vm

private com.sun.jdi.VirtualMachine _vm

_connected

private boolean _connected
Constructor Detail

EventHandler

EventHandler(DebugManager manager,
             com.sun.jdi.VirtualMachine vm)
Method Detail

run

public void run()
Overrides:
run in class Thread

handleEvent

public void handleEvent(com.sun.jdi.event.Event e)

_handleBreakpointEvent

private void _handleBreakpointEvent(com.sun.jdi.event.BreakpointEvent e)

_handleStepEvent

private void _handleStepEvent(com.sun.jdi.event.StepEvent e)

_handleModificationWatchpointEvent

private void _handleModificationWatchpointEvent(com.sun.jdi.event.ModificationWatchpointEvent e)

_handleClassPrepareEvent

private void _handleClassPrepareEvent(com.sun.jdi.event.ClassPrepareEvent e)

_handleThreadDeathEvent

private void _handleThreadDeathEvent(com.sun.jdi.event.ThreadDeathEvent e)

_handleVMDeathEvent

private void _handleVMDeathEvent(com.sun.jdi.event.VMDeathEvent e)

_handleVMDisconnectEvent

private void _handleVMDisconnectEvent(com.sun.jdi.event.VMDisconnectEvent e)

_cleanUp

private void _cleanUp(com.sun.jdi.event.Event e)

handleDisconnectedException

void handleDisconnectedException()
A VMDisconnectedException has happened while dealing with another event. We need to flush the event queue, dealing only with exit events (VMDeath, VMDisconnect) so that we terminate correctly.