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

All Superinterfaces:
MasterRemote, Remote
All Known Implementing Classes:
MainJVM

public interface MainJVMRemoteI
extends MasterRemote

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

Version:
$Id: MainJVMRemoteI.java 4544 2008-07-08 06:59:53Z rcartwright $

Method Summary
 void classFileError(ClassFileError e)
          Called if the slave JVM encounters an illegal class file during testing.
 String getConsoleInput()
          Asks the main jvm for input from the console.
 File getFileForClassName(String className)
          Called when the JUnitTestManager wants to open a file that is not currently open.
 void nonTestCase(boolean isTestAll)
          Called if JUnit is invoked on a non TestCase class.
 void quitFailed(Throwable th)
          This method is called by the interpreter JVM if it cannot be exited (likely because of its having a security manager)
 void systemErrPrint(String s)
          Forwards a call to System.err from InterpreterJVM to the MainJVM for output to the user.
 void systemOutPrint(String s)
          Forwards a call to System.out from InterpreterJVM to the MainJVM for output to the user.
 void testEnded(String testName, boolean wasSuccessful, boolean causedError)
          Called when a particular test has ended.
 void testStarted(String testName)
          Called when a particular test is started.
 void testSuiteEnded(JUnitError[] errors)
          Called when a full suite of tests has finished running.
 void testSuiteStarted(int numTests)
          Called to indicate that a suite of tests has started running.
 
Methods inherited from interface edu.rice.cs.util.newjvm.MasterRemote
checkStillAlive, errorStartingSlave, registerSlave
 

Method Detail

systemErrPrint

void systemErrPrint(String s)
                    throws RemoteException
Forwards a call to System.err from InterpreterJVM to the MainJVM for output to the user.

Parameters:
s - String that was printed in the other JVM
Throws:
RemoteException

systemOutPrint

void systemOutPrint(String s)
                    throws RemoteException
Forwards a call to System.out from InterpreterJVM to the MainJVM for output to the user.

Parameters:
s - String that was printed in the other JVM
Throws:
RemoteException

getConsoleInput

String getConsoleInput()
                       throws RemoteException
Asks the main jvm for input from the console.

Returns:
the console input
Throws:
RemoteException

quitFailed

void quitFailed(Throwable th)
                throws RemoteException
This method is called by the interpreter JVM if it cannot be exited (likely because of its having a security manager)

Parameters:
th - The Throwable thrown by System.exit
Throws:
RemoteException

nonTestCase

void nonTestCase(boolean isTestAll)
                 throws RemoteException
Called if JUnit is invoked on a non TestCase class.

Parameters:
isTestAll - whether or not it was a use of the test all button
Throws:
RemoteException

classFileError

void classFileError(ClassFileError e)
                    throws RemoteException
Called if the slave JVM encounters an illegal class file during testing.

Parameters:
e - the ClassFileError object describing the error when loading the class file.
Throws:
RemoteException

testSuiteStarted

void testSuiteStarted(int numTests)
                      throws RemoteException
Called to indicate that a suite of tests has started running.

Parameters:
numTests - The number of tests in the suite to be run.
Throws:
RemoteException

testStarted

void testStarted(String testName)
                 throws RemoteException
Called when a particular test is started.

Parameters:
testName - The name of the test being started.
Throws:
RemoteException

testEnded

void testEnded(String testName,
               boolean wasSuccessful,
               boolean causedError)
               throws RemoteException
Called when a particular test has ended.

Parameters:
testName - The name of the test that has ended.
wasSuccessful - Whether the test passed or not.
causedError - If not successful, whether the test caused an error or simply failed.
Throws:
RemoteException

testSuiteEnded

void testSuiteEnded(JUnitError[] errors)
                    throws RemoteException
Called when a full suite of tests has finished running.

Parameters:
errors - The array of errors from all failed tests in the suite.
Throws:
RemoteException

getFileForClassName

File getFileForClassName(String className)
                         throws RemoteException
Called when the JUnitTestManager wants to open a file that is not currently open.

Parameters:
className - the name of the class for which we want to find the file
Returns:
the file associated with the given class
Throws:
RemoteException