1 55 56 package org.apache.bsf.debug.meta; 57 58 import java.io.*; 59 import java.net.*; 60 import org.apache.bsf.debug.*; 61 import org.apache.bsf.debug.jsdi.*; 62 import org.apache.bsf.debug.util.*; 63 64 public class JsCallbacksDispatcher extends Dispatcher { 65 66 public JsCallbacksDispatcher(SocketConnection con) { 67 super(con); 68 } 69 70 public void dispatch(ResultCell rcell) throws Exception { 71 String filename, lang; 72 int count, tid, uid; 73 boolean bool; 74 JsContext cx; 75 Object obj; 76 JsCallbacks self; 77 Exception ex; 78 79 self = (JsCallbacks) rcell.selfSkel; 80 81 switch (rcell.methodId) { 82 83 case DebugConstants.CB_POLL : 84 rcell.booleanResult(true); 85 break; 86 87 case DebugConstants.CB_HANDLE_BREAKPOINT_HIT : 88 cx = (JsContext) rcell.readObject(); 89 self.handleBreakpointHit(cx); 90 rcell.voidResult(); 91 break; 92 93 case DebugConstants.CB_HANDLE_ENGINE_STOPPED : 94 cx = (JsContext) rcell.readObject(); 95 self.handleEngineStopped(cx); 96 rcell.voidResult(); 97 break; 98 99 case DebugConstants.CB_HANDLE_EXCEPTION_THROWN : 100 cx = (JsContext) rcell.readObject(); 101 ex = (Exception ) rcell.readObject(); 102 self.handleExceptionThrown(cx, ex); 103 rcell.voidResult(); 104 break; 105 106 case DebugConstants.CB_HANDLE_STEPPING_DONE : 107 cx = (JsContext) rcell.readObject(); 108 self.handleSteppingDone(cx); 109 rcell.voidResult(); 110 break; 111 } 112 } 113 } 114 | Popular Tags |