|
S-PLUS Connect/Java v1.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
com.insightful.splus.SplusDebugHandler
public class SplusDebugHandler
The intent of this class is to provide a single entry/exit point for the debug functionality contained in the S-PLUS engine and accessed via the java connection. It is intended to be a relatively thread-safe gateway that will send requests to the engine, block when needed, and notify listeners when appropriate info has been recieved back from the engine. It should never be instantiated by another class and is meant to be accessed via the static calls.
Field Summary |
---|
Fields inherited from class java.rmi.server.RemoteObject |
---|
ref |
Constructor Summary | |
---|---|
SplusDebugHandler()
Default constructor just starts the job queue for communication with the engine |
Method Summary | |
---|---|
void |
addBreakpoint(String functionName,
String outerFunctionName,
long[] functionAddress)
wrapper function used to call native add breakpoing method as a blocking request |
void |
addSplusDebugListener(SplusDebugListener listener)
add an SplusDebugListener...listners will be notified whenever new debug info is recieved from the engine |
void |
doCallStack(long exprID)
wrapper function used to call native call stack method as a blocking request |
void |
doEvaluate(long exprID,
String expr)
wrapper function used to call native evaluation method as a blocking request |
void |
doFrameDown(long exprID)
wrapper function used to call native frame down method |
void |
doFrameUp(long exprID)
wrapper function used to call native frame up method |
void |
doInvisibleEvaluate(long exprID,
String expr)
wrapper function used to call native evaluation method (add's invisible wrapper) |
void |
doObjects(long exprID)
wrapper function used to call native objects method as a blocking request |
boolean |
doParse(String expr)
wrapper function used to call native parse method |
void |
doPause(long exprID)
wrapper function used to call native pause method |
void |
doResume(long exprID)
wrapper function used to call native resume method |
void |
doSetCommandLine(boolean commandLine)
wrapper function used to call native set command line method |
long |
doStart(String expr)
wrapper function used to call native start method |
void |
doStep(long exprID)
wrapper function used to call native step method |
void |
doStepIn(long exprID)
wrapper function used to call native step in method |
void |
doStepOut(long exprID)
wrapper function used to call native step out method |
void |
doStop(long exprID)
wrapper function used to call native stop method |
long[] |
getBreakAddress()
get the current address relative to the currnet top-level function |
String |
getBreakInfo()
get the current description |
String |
getCall(int i)
get a particular call description |
String |
getCallName(int i)
get a particular stack function name |
String |
getContainerCallName(int i)
get a particular stack top-level function name |
String |
getEval(String request,
int i)
get a particular evaluation of an expression |
static SplusDebugHandler |
getInstance()
get singleton instance of the SplusDebugHandler |
int |
getNumCalls()
get number of stack frames recieved from the engine |
int |
getNumEvals(String request)
get the nubmer of evaluations recived for a given expression |
int |
getNumObjects()
retrieves the number of objects recieved from the engine |
String[] |
getObjectData(int i)
retrieve a particular object's data in a string array of length 6 in the following order: class, mode, length, extent, creation date, & value. |
String |
getObjectName(int i)
retrieve a particular object name |
void |
removeBreakpoint(String functionName,
String outerFunctionName,
long[] functionAddress)
wrapper function used to call native remove breakpoint method as a blocking request |
void |
removeSplusDebugListener(SplusDebugListener listener)
remove an SplusDebugListener |
static void |
setBreakInfo(String breakInfo,
long[] breakAddress)
called from the engine to store the furrent expression and it's address |
static void |
setCallStackInfo(String[] funNames,
String[] containerFunctions,
String[] stackItems)
called from the engine to store info about the call stack. |
void |
setDebugMode(boolean debug)
wrapper function used to call native set debug mode and command line methods |
void |
setErrorBreakpoint(boolean set)
wrapper function used to call native set error breakpoint method |
static void |
setEvalInfo(String request,
String[] evalVals)
called from the engine to store expression evaluations |
static void |
setObjectsInfo(String[] objNames,
String[] objClass,
String[] objMode,
String[] objLength,
String[] objExtent,
String[] objDate,
String[] objValue)
called from the engine to store info about the objects in the current frame. |
void |
setWarningBreakpoint(boolean set)
wrapper function used to call native set warning breakpoint method |
void |
start()
make sure the job queue has started and that it isn't waiting for info |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
---|
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
---|
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
---|
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SplusDebugHandler() throws RemoteException
RemoteException
Method Detail |
---|
public static SplusDebugHandler getInstance() throws RemoteException
RemoteException
public void start() throws RemoteException
start
in interface com.insightful.splus.SplusDebugHandlerInterface
RemoteException
public static void setObjectsInfo(String[] objNames, String[] objClass, String[] objMode, String[] objLength, String[] objExtent, String[] objDate, String[] objValue) throws RemoteException
objNames
- list of object namesobjClass
- list of object classesobjMode
- list of object modesobjLength
- list of object lengthsobjExtent
- list of object extentsobjDate
- list of object creation datesobjValue
- list of object values as if the object had been printed using
print(object)
RemoteException
public int getNumObjects() throws RemoteException
getNumObjects
in interface com.insightful.splus.SplusDebugHandlerInterface
RemoteException
public String getObjectName(int i) throws RemoteException
getObjectName
in interface com.insightful.splus.SplusDebugHandlerInterface
RemoteException
public String[] getObjectData(int i)
getObjectData
in interface com.insightful.splus.SplusDebugHandlerInterface
public static void setCallStackInfo(String[] funNames, String[] containerFunctions, String[] stackItems) throws RemoteException
funNames
- string array of function namescontainerFunctions
- string array of any top-level function names
(for example, if foo is defined inside bar, then foo is the funName and
bar is the containerFunction)stackItems
- string array of stack item descriptions
RemoteException
public int getNumCalls() throws RemoteException
getNumCalls
in interface com.insightful.splus.SplusDebugHandlerInterface
RemoteException
public String getCall(int i) throws RemoteException
getCall
in interface com.insightful.splus.SplusDebugHandlerInterface
RemoteException
public String getCallName(int i) throws RemoteException
getCallName
in interface com.insightful.splus.SplusDebugHandlerInterface
RemoteException
public String getContainerCallName(int i) throws RemoteException
getContainerCallName
in interface com.insightful.splus.SplusDebugHandlerInterface
RemoteException
public static void setEvalInfo(String request, String[] evalVals) throws RemoteException
request
- the expression that has been evaluatedevalVals
- an array of values the expression evaluated
to.
RemoteException
public int getNumEvals(String request) throws RemoteException
getNumEvals
in interface com.insightful.splus.SplusDebugHandlerInterface
RemoteException
public String getEval(String request, int i) throws RemoteException
getEval
in interface com.insightful.splus.SplusDebugHandlerInterface
RemoteException
public static void setBreakInfo(String breakInfo, long[] breakAddress) throws RemoteException
breakInfo
- string description of the current expressionbreakAddress
- address of current expression relative to the
top-level function
RemoteException
public String getBreakInfo() throws RemoteException
getBreakInfo
in interface com.insightful.splus.SplusDebugHandlerInterface
RemoteException
public long[] getBreakAddress() throws RemoteException
getBreakAddress
in interface com.insightful.splus.SplusDebugHandlerInterface
RemoteException
public void addSplusDebugListener(SplusDebugListener listener) throws RemoteException
addSplusDebugListener
in interface com.insightful.splus.SplusDebugHandlerInterface
RemoteException
public void removeSplusDebugListener(SplusDebugListener listener) throws RemoteException
removeSplusDebugListener
in interface com.insightful.splus.SplusDebugHandlerInterface
RemoteException
public void doSetCommandLine(boolean commandLine)
doSetCommandLine
in interface com.insightful.splus.SplusDebugHandlerInterface
public boolean doParse(String expr)
doParse
in interface com.insightful.splus.SplusDebugHandlerInterface
public long doStart(String expr)
doStart
in interface com.insightful.splus.SplusDebugHandlerInterface
public void doStop(long exprID)
doStop
in interface com.insightful.splus.SplusDebugHandlerInterface
public void doPause(long exprID)
doPause
in interface com.insightful.splus.SplusDebugHandlerInterface
public void doResume(long exprID)
doResume
in interface com.insightful.splus.SplusDebugHandlerInterface
public void doStep(long exprID)
doStep
in interface com.insightful.splus.SplusDebugHandlerInterface
public void doStepIn(long exprID)
doStepIn
in interface com.insightful.splus.SplusDebugHandlerInterface
public void doStepOut(long exprID)
doStepOut
in interface com.insightful.splus.SplusDebugHandlerInterface
public void doFrameUp(long exprID)
doFrameUp
in interface com.insightful.splus.SplusDebugHandlerInterface
public void doFrameDown(long exprID)
doFrameDown
in interface com.insightful.splus.SplusDebugHandlerInterface
public void doInvisibleEvaluate(long exprID, String expr)
doInvisibleEvaluate
in interface com.insightful.splus.SplusDebugHandlerInterface
public void doEvaluate(long exprID, String expr)
doEvaluate
in interface com.insightful.splus.SplusDebugHandlerInterface
public void doObjects(long exprID)
doObjects
in interface com.insightful.splus.SplusDebugHandlerInterface
public void doCallStack(long exprID)
doCallStack
in interface com.insightful.splus.SplusDebugHandlerInterface
public void addBreakpoint(String functionName, String outerFunctionName, long[] functionAddress)
addBreakpoint
in interface com.insightful.splus.SplusDebugHandlerInterface
public void removeBreakpoint(String functionName, String outerFunctionName, long[] functionAddress)
removeBreakpoint
in interface com.insightful.splus.SplusDebugHandlerInterface
public void setDebugMode(boolean debug)
setDebugMode
in interface com.insightful.splus.SplusDebugHandlerInterface
public void setErrorBreakpoint(boolean set)
setErrorBreakpoint
in interface com.insightful.splus.SplusDebugHandlerInterface
public void setWarningBreakpoint(boolean set)
setWarningBreakpoint
in interface com.insightful.splus.SplusDebugHandlerInterface
|
S-PLUS Connect/Java v1.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |