| java.rmi.server.UnicastRemoteObject edu.rice.cs.util.newjvm.AbstractSlaveJVM
All known Subclasses: edu.rice.cs.drjava.model.repl.newjvm.InterpreterJVM,
AbstractSlaveJVM | abstract public class AbstractSlaveJVM extends UnicastRemoteObject implements SlaveRemote(Code) | | A partial implementation of a
SlaveRemote that provides the quit functionality and that also periodically
checks if the master is still alive and automatically quits if not.
version: $Id: AbstractSlaveJVM.java 4260 2007-10-10 20:28:34Z mgricken $ |
Method Summary | |
protected void | beforeQuit() This method is called just before the JVM is quit. | abstract protected void | handleStart(MasterRemote master) Called when the slave JVM has started running. | final public synchronized void | quit() Quits the slave JVM, calling
AbstractSlaveJVM.beforeQuit before it does. | protected void | quitFailed(Throwable th) | final public void | start(MasterRemote master) Initializes the Slave JVM including starting background thread to periodically poll the master JVM and
automatically quit if it's dead. |
CHECK_MAIN_VM_ALIVE_SECONDS | final public static int CHECK_MAIN_VM_ALIVE_SECONDS(Code) | | |
_pollMasterThreadName | protected volatile String _pollMasterThreadName(Code) | | Name of the thread to periodically poll the master.
|
_quitSlaveThreadName | protected volatile String _quitSlaveThreadName(Code) | | Name of the thread to quit the slave.
|
beforeQuit | protected void beforeQuit()(Code) | | This method is called just before the JVM is quit. It can be overridden to provide cleanup code, etc.
|
handleStart | abstract protected void handleStart(MasterRemote master)(Code) | | Called when the slave JVM has started running. Subclasses must implement this method.
|
quitFailed | protected void quitFailed(Throwable th)(Code) | | This method is called if the interpreterJVM cannot be exited (likely because of a unexpected security manager.)
|
start | final public void start(MasterRemote master) throws RemoteException(Code) | | Initializes the Slave JVM including starting background thread to periodically poll the master JVM and
automatically quit if it's dead. Unsynchronized because
(i) this method can only be called once (without throwing an error) and _master is immutable once assigned here
until quit()
(ii) this method does not depend on any mutable state in this (which constrains
AbstractSlaveJVM.handleStart ); and
(iii) this method (and perhaps
AbstractSlaveJVM.handleStart ) perform remote calls on master.
This method delegates starting actions other than polling master to
AbstractSlaveJVM.handleStart .
|
|
|