The RPC class supports remote procedure calls. Its current interface is
public class RPC {
public static void call(String childClass, String remoteHost,
Port toChild) ;
public static void spawn(String childClass, String remoteHost,
Port toChild) ;
}
The call operation invokes a Java application on a remote processor,
and sends a channel-end to it. childClass should be the name of
a class derived from Child, with a main method. remoteHost should be the name of a host. toChild should be a
port with a bound channel end. The call operation terminates
when the remote call to main terminates. When the call
completes, toChild is unconnected (the remote application is
responsible for disposal of the channel-end it was initially sent).
spawn is similar, but invokes call in a new thread, so it returns immediately.
Typical usage would be
// Create output channel
Port R = new Port() ;
Port S = new Port() ;
Port.channel(R, S) ;
// Spawn remote `Child' application
RPC.spawn("EgChild", "koum", S) ;
... communicate with child through `R'.
The current implementation of RPC.call uses the Java exec mechanism to run the command
rsh remoteHost java childClassThe remote host is a processor on which