|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface InteractionsModelCallback
Callback interface which allows an InteractionsModel to respond to events in a remote Java interpreter. These methods may run outside the event thread!
Method Summary | |
---|---|
void |
changeInputListener(InputListener oldListener,
InputListener newListener)
Changes the input listener. |
String |
getConsoleInput()
Called when input is request from System.in. |
int |
getDebugPort()
Returns an available port number to use for debugging a remote interpreter. |
void |
interpreterReady(File wd)
Called when a new Java interpreter has registered and is ready for use. |
void |
interpreterResetFailed(Throwable th)
This method is called by the Main JVM if the Interpreter JVM cannot be exited (likely because of its having a security manager) |
void |
interpreterResetting()
Called when the interpreter starts to reset. |
void |
replCalledSystemExit(int status)
Signifies that the most recent interpretation contained a call to System.exit. |
void |
replReturnedResult(String result,
String style)
Signifies that the most recent interpretation completed successfully, returning a value. |
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. |
void |
replReturnedVoid()
Signifies that the most recent interpretation completed successfully, returning no value. |
void |
replSystemErrPrint(String s)
Called when the repl prints to System.err. |
void |
replSystemOutPrint(String s)
Called when the repl prints to System.out. |
void |
replThrewException(String message)
Signifies that the most recent interpretation was ended due to an exception being thrown. |
void |
setInputListener(InputListener listener)
Sets the listener for any type of single-source input event. |
void |
slaveJVMUsed()
Called when the slave JVM is used |
Method Detail |
---|
int getDebugPort() throws IOException
IOException
- if unable to get a valid port number.void replSystemOutPrint(String s)
s
- String to printvoid replSystemErrPrint(String s)
s
- String to printString getConsoleInput()
void setInputListener(InputListener listener)
listener
- a listener that reacts to input requests
IllegalStateException
- if the input listener is lockedvoid changeInputListener(InputListener oldListener, InputListener newListener)
oldListener
- the previous listenernewListener
- the listener to install
IllegalArgumentException
- if oldListener is not the currently installed listenervoid replReturnedVoid()
void replReturnedResult(String result, String style)
result
- The .toString-ed version of the value that was returned
by the interpretation. We must return the String form
because returning the Object directly would require the
data type to be serializable.void replThrewException(String message)
message
- The exception's messagevoid replReturnedSyntaxError(String errorMessage, String interaction, int startRow, int startCol, int endRow, int endCol)
errorMessage
- The syntax error messagestartRow
- The starting row of the errorstartCol
- The starting column of the errorendRow
- The end row of the errorendCol
- The end column of the errorvoid replCalledSystemExit(int status)
status
- The exit status that will be returned.void interpreterResetFailed(Throwable th)
th
- The Throwable thrown by System.exitvoid interpreterResetting()
void interpreterReady(File wd)
void slaveJVMUsed()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |