| edu.rice.cs.drjava.model.repl.InteractionsModelCallback
All known Subclasses: edu.rice.cs.drjava.model.repl.InteractionsModel,
InteractionsModelCallback | public interface InteractionsModelCallback (Code) | | Callback interface which allows an InteractionsModel to respond to events in a remote Java interpreter.
version: $Id: InteractionsModelCallback.java 4255 2007-08-28 19:17:37Z mgricken $ |
Method Summary | |
public void | changeInputListener(InputListener oldListener, InputListener newListener) Changes the input listener. | public String | getConsoleInput() Called when input is request from System.in. | public int | getDebugPort() Returns an available port number to use for debugging a remote interpreter. | public void | interpreterReady(File wd) Called when a new Java interpreter has registered and is ready for use. | public void | interpreterResetFailed(Throwable th) | public void | interpreterResetting() Called when the interpreter starts to reset. | public void | replCalledSystemExit(int status) Signifies that the most recent interpretation contained a call to System.exit. | public void | replReturnedResult(String result, String style) Signifies that the most recent interpretation completed successfully,
returning a value.
Parameters: result - The .toString-ed version of the value that was returnedby the interpretation. | public void | replReturnedSyntaxError(String errorMessage, String interaction, int startRow, int startCol, int endRow, int endCol) Signifies that the most recent interpretation was preempted by a syntax error. | public void | replReturnedVoid() Signifies that the most recent interpretation completed successfully,
returning no value. | public void | replSystemErrPrint(String s) Called when the repl prints to System.err. | public void | replSystemOutPrint(String s) Called when the repl prints to System.out. | public void | replThrewException(String exceptionClass, String message, String stackTrace, String specialMessage) Signifies that the most recent interpretation was ended due to an exception being thrown. | public void | setInputListener(InputListener listener) Sets the listener for any type of single-source input event. | public void | slaveJVMUsed() |
changeInputListener | public void changeInputListener(InputListener oldListener, InputListener newListener)(Code) | | Changes the input listener. Takes in the old listener to ensure that the owner of the original
listener is aware that it is being changed.
Parameters: oldListener - the previous listener Parameters: newListener - the listener to install throws: IllegalArgumentException - if oldListener is not the currently installed listener |
getConsoleInput | public String getConsoleInput()(Code) | | Called when input is request from System.in.
the input given to System.in |
getDebugPort | public int getDebugPort() throws IOException(Code) | | Returns an available port number to use for debugging a remote interpreter.
throws: IOException - if unable to get a valid port number. |
interpreterReady | public void interpreterReady(File wd)(Code) | | Called when a new Java interpreter has registered and is ready for use.
|
interpreterResetFailed | public void interpreterResetFailed(Throwable th)(Code) | | This method is called by the Main JVM if the Interpreter JVM cannot be exited (likely because of its
having a security manager)
Parameters: th - The Throwable thrown by System.exit |
interpreterResetting | public void interpreterResetting()(Code) | | Called when the interpreter starts to reset.
|
replCalledSystemExit | public void replCalledSystemExit(int status)(Code) | | Signifies that the most recent interpretation contained a call to System.exit.
Parameters: status - The exit status that will be returned. |
replReturnedResult | public void replReturnedResult(String result, String style)(Code) | | Signifies that the most recent interpretation completed successfully,
returning a value.
Parameters: result - The .toString-ed version of the value that was returnedby the interpretation. We must return the String formbecause returning the Object directly would require thedata type to be serializable. |
replReturnedSyntaxError | public void replReturnedSyntaxError(String errorMessage, String interaction, int startRow, int startCol, int endRow, int endCol)(Code) | | Signifies that the most recent interpretation was preempted by a syntax error.
Parameters: errorMessage - The syntax error message Parameters: startRow - The starting row of the error Parameters: startCol - The starting column of the error Parameters: endRow - The end row of the error Parameters: endCol - The end column of the error |
replReturnedVoid | public void replReturnedVoid()(Code) | | Signifies that the most recent interpretation completed successfully,
returning no value.
|
replSystemErrPrint | public void replSystemErrPrint(String s)(Code) | | Called when the repl prints to System.err.
Parameters: s - String to print |
replSystemOutPrint | public void replSystemOutPrint(String s)(Code) | | Called when the repl prints to System.out.
Parameters: s - String to print |
replThrewException | public void replThrewException(String exceptionClass, String message, String stackTrace, String specialMessage)(Code) | | Signifies that the most recent interpretation was ended due to an exception being thrown.
Parameters: exceptionClass - The name of the class of the thrown exception Parameters: message - The exception's message Parameters: stackTrace - The stack trace of the exception |
setInputListener | public void setInputListener(InputListener listener)(Code) | | Sets the listener for any type of single-source input event. The listener can only be changed with
the changeInputListener method.
Parameters: listener - a listener that reacts to input requests throws: IllegalStateException - if the input listener is locked |
slaveJVMUsed | public void slaveJVMUsed()(Code) | | Called when the slave JVM is used
|
|
|