This package is a system to allow the invocation and control of
a new Java virtual machine. The two JVMs can communicate by using
RMI.
To use these classes:
- Create a remote interface that the master JVM will support,
extending {@link edu.rice.cs.util.newjvm.MasterRemote}. This
interface must specify of the methods that the slave JVM can call
on the master JVM. All methods in this interface must be declared
to throw {@link java.rmi.RemoteException.}
- Create a remote interface that the slave JVM will support,
extending {@link edu.rice.cs.util.newjvm.SlaveRemote}. This
interface must specify of the methods that the master JVM can call
on the slave JVM. All methods in this interface must be declared
to throw {@link java.rmi.RemoteException.}
- Create the master JVM implementation, which must extend {@link
edu.rice.cs.util.newjvm.AbstractMasterJVM} and implement
YourMasterInterface. Note that the
super()
call must
pass to AbstractMasterJVM the fully-qualified class name of the
slave JVM implementation.
- Create the slave JVM implementation, which must extend {@link
edu.rice.cs.util.newjvm.AbstractSlaveJVM} and implement
YourSlaveInterface.
Now you can create an instance of your master JVM class and use its
{@link edu.rice.cs.util.newjvm.AbstractMasterJVM#invokeSlave} method
to start the slave JVM.