private synchronized void dispatchEvent(VirtualMachine vm, Event e) {
Iterator<JVMListener> listeners = this.session.getJVMHandler().getListeners();
while (listeners.hasNext()) {
JVMListener listener = listeners.next();
if (e instanceof VMStartEvent) {
listener.VMStartEvent();
}
else if (e instanceof BreakpointEvent) {
listener.breakpointEvent((BreakpointEvent)e);
} else if (e instanceof ClassPrepareEvent) {
listener.classPrepareEvent((ClassPrepareEvent)e);