1 55 56 package org.apache.bsf.dbline; 57 58 import java.rmi.RemoteException ; 59 import org.apache.bsf.debug.*; 60 import org.apache.bsf.debug.jsdi.*; 61 62 73 public class Callbacks 74 extends org.apache.bsf.debug.util.Skeleton 75 implements BSFDebugger, JsCallbacks { 76 77 JsDb db; 78 79 Callbacks(JsDb db) throws RemoteException { 80 super(org.apache.bsf.debug.util.DebugConstants.BSF_DEBUGGER_TID); 81 this.db = db; 82 } 83 87 public boolean poll() { 88 return true; 89 } 90 public void createdEngine(String lang, Object engine) throws RemoteException { 91 if (lang.equals("javascript")) { 92 db.createdEngine((JsEngine)engine); 93 } 94 } 95 public void deletedEngine(Object engine) throws RemoteException { 96 if (engine instanceof JsEngine) { 97 db.deletedEngine((JsEngine)engine); 98 } 99 } 100 public void disconnect() throws RemoteException { 101 System.out.println("Line debugger disconnected..."); 102 } 103 public void handleBreakpointHit(JsContext cx) throws RemoteException { 107 db.handleBreakpointHit(cx); 108 } 109 public void handleEngineStopped(JsContext cx) throws RemoteException { 110 db.handleEngineStopped(cx); 111 } 112 public void handleExceptionThrown(JsContext cx, Object exception) throws RemoteException { 113 db.handleExceptionThrown(cx,exception); 114 } 115 public void handleSteppingDone(JsContext cx) throws RemoteException { 116 db.handleSteppingDone(cx); 117 } 118 } 119 | Popular Tags |