edu.rice.cs.drjava.model.repl.newjvm
Interface MainJVMRemoteI

All Superinterfaces:
Remote
All Known Implementing Classes:
MainJVM

public interface MainJVMRemoteI
extends Remote

This interface specifies the methods that the Main JVM exposes for the InterpreterJVM to call.

Version:
$Id: MainJVMRemoteI.java,v 1.6 2002/08/15 23:03:58 jhsia Exp $

Method Summary
 void checkStillAlive()
          The interpreter JVM calls this method periodically to ensure the main VM is still alive.
 void nonTestCase()
           
 void registerInterpreterJVM(InterpreterJVMRemoteI remote)
          Registers the interpreter JVM for later callbacks.
 void returnedResult(String result)
          Signifies that the most recent interpretation completed successfully, returning a value.
 void returnedVoid()
          Signifies that the most recent interpretation completed successfully, returning no value.
 void systemErrPrint(String s)
           
 void systemOutPrint(String s)
           
 void testFinished(JUnitError[] errors)
           
 void threwException(String exceptionClass, String message, String stackTrace)
          Signifies that the most recent interpretation was ended due to an exception being thrown.
 

Method Detail

systemErrPrint

public void systemErrPrint(String s)
                    throws RemoteException

systemOutPrint

public void systemOutPrint(String s)
                    throws RemoteException

registerInterpreterJVM

public void registerInterpreterJVM(InterpreterJVMRemoteI remote)
                            throws RemoteException
Registers the interpreter JVM for later callbacks.
Parameters:
remote - The interpreter JVM controller.

returnedVoid

public void returnedVoid()
                  throws RemoteException
Signifies that the most recent interpretation completed successfully, returning no value.

returnedResult

public void returnedResult(String result)
                    throws RemoteException
Signifies that the most recent interpretation completed successfully, returning a value.
Parameters:
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.

threwException

public void threwException(String exceptionClass,
                           String message,
                           String stackTrace)
                    throws RemoteException
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
message - The exception's message
stackTrace - The stack trace of the exception

checkStillAlive

public void checkStillAlive()
                     throws RemoteException
The interpreter JVM calls this method periodically to ensure the main VM is still alive. If it's not, the interpreter just quits.

nonTestCase

public void nonTestCase()
                 throws RemoteException

testFinished

public void testFinished(JUnitError[] errors)
                  throws RemoteException