edu.cmu.emulator.daemon
Class DaemonCommunicator

java.lang.Object
  extended by edu.cmu.emulator.daemon.DaemonCommunicator

public class DaemonCommunicator
extends Object

This class is responsible for communicating with the daemons running on the remote nodes.It maintains a mapping of the nodes and a reference to the daemon stubs. This way, when the class methods are invoked to perform a remote invocation on a specific node's daemon, the class will find the daemon stub exported by that daemon and perform the remote method invocation on its behalf, returning the result to the user code.

See Also:
DaemonInterface, NodeDaemon

Field Summary
private  EmuInterface emu
          The RMI interface on the Emulator
private  RWLock execLock
           
protected  String HostIP
           
protected static int JE_RMI_HOSTNAME_INDEX
          Default location of the hostname
protected static String JEXEC_CMD_0_HEAD
          part of the Default Java command that starts the rmi server on the emulator
protected static String JEXEC_CMD_0_TAIL
           
protected static String JEXEC_CMD_1_HEAD
          part of the Default Java command that starts the rmi server on the emulator
protected static String JEXEC_CMD_1_TAIL
           
protected static String[] JEXEC_CMDS
          Default Java command that starts the rmi server on the emulator
protected  Logger log
           
private  HashMap map
          map nodes to RMI stubs
private  MessageCenter msgCenter
          The message center
private  DaemonInterface[] nodeDaemonStubs
          The nodeDaemon Interface (stub on emulator)
private  HashMap procListenerMap
          map processes to listeners
static boolean verboseDC
          Verbose display control
private  EmuWorld world
          The experiment EmuWorld
 
Constructor Summary
DaemonCommunicator(EmuWorld world)
          Constructor.
 
Method Summary
 void exec(String nodeName, String cmd, Boolean asynchronousObj, Boolean exitOnErrorObj, LogSpec logSpec)
           
 RemoteProcess execProcess_CentralLogIO(String nodeName, String[] cmds, String stdoutFileName, String stderrFileName, ProcListener pl)
          Execute a list of commands on a remote node
 RemoteProcess execProcess_CentralLogIO(String nodeName, String cmds, String stdoutFileName, String stderrFileName)
          Execute a command on a remote node
 RemoteProcess execProcess_CentralLogIO(String nodeName, String cmds, String stdoutFileName, String stderrFileName, ProcListener pl)
          Execute a command on a remote node
 RemoteProcess execProcess_ConsoleIO(String nodeName, String[] cmds, int ioOptions, ProcListener pl)
          Execute a list of commands on a remote node
 RemoteProcess execProcess_ConsoleIO(String nodeName, String cmds, int ioOptions, ProcListener pl)
          Execute a command on a remote node
 RemoteProcess execProcess_NodeLogIO(String nodeName, String[] cmds, String stdoutFileName, String stderrFileName, ProcListener pl)
          Execute a list of commands on a remote node
 RemoteProcess execProcess_NodeLogIO(String nodeName, String cmds, String stdoutFileName, String stderrFileName, ProcListener pl)
          Execute a command on a remote node
 RemoteProcess execProcess_RelayIO(String nodeName, String[] cmds, int ioOptions, ProcListener pl)
          Execute a list of commands on a remote node
 RemoteProcess execProcess_RelayIO(String nodeName, String cmds, int ioOptions, ProcListener pl)
          Execute a command on a remote node
 RemoteProcess execProcess(String nodeName, String[] cmds, ProcControl pc, ProcListener pl)
          Execute a list of commands on a remote node
 RemoteProcess execProcess(String nodeName, String[] cmds, ProcListener pl)
          Execute a list of commands on a remote node
 RemoteProcess execProcess(String nodeName, String cmds, ProcControl pc, ProcListener pl)
          Execute a command on a remote node
 RemoteProcess execProcess(String nodeName, String cmds, ProcListener pl)
          Execute a command on a remote node
 int execProcessAndWait_CentralLogIO(String nodeName, String[] cmds, String stdoutFileName, String stderrFileName)
          Execute a list of commands on a remote node, and wait for returned values
 int execProcessAndWait_CentralLogIO(String nodeName, String cmds, String stdoutFileName, String stderrFileName)
          Execute a command on a remote node, and wait for returned values
 int execProcessAndWait_ConsoleIO(String nodeName, String cmds)
          Execute a command on a remote node, and wait for returned values
 int execProcessAndWait_ConsoleIO(String nodeName, String[] cmds, int ioOptions)
          Execute a list of commands on a remote node, and wait for returned values
 int execProcessAndWait_ConsoleIO(String nodeName, String cmds, int ioOptions)
          Execute a command on a remote node, and wait for returned values
 int execProcessAndWait_NodeLogIO(String nodeName, String[] cmds, String stdoutFileName, String stderrFileName)
          Execute a list of commands on a remote node, and wait for returned values
 int execProcessAndWait_NodeLogIO(String nodeName, String cmds, String stdoutFileName, String stderrFileName)
          Execute a command on a remote node, and wait for returned values
 int execProcessAndWait(String nodeName, String cmds)
          Execute a command on a remote node, and wait for returned values
 int execProcessAndWait(String nodeName, String[] cmds)
          Execute a list of commands on a remote node, and wait for returned values
 int execProcessAndWait(String nodeName, String[] cmds, ProcControl pc)
          Execute a list of commands on a remote node, and wait for returned values
 int execProcessAndWait(String nodeName, String cmds, ProcControl pc)
          Execute a command on a remote node, and wait for returned values
protected  ProcessID finishExec(String nodeName, int pID, ProcListener pl)
           
 DaemonInterface getDaemonStub(String nodeName)
          obtain the Daemon Interface for the node
 RemoteProcess jExec_CentralLogIO(String nodeName, String[] cmds, String stdoutFileName, String stderrFileName, ProcListener pl)
          Execute a list of commands on a remote node
 RemoteProcess jExec_CentralLogIO(String nodeName, String cmds, String stdoutFileName, String stderrFileName, ProcListener pl)
          Execute a command on a remote node
 RemoteProcess jExec_NodeLogIO(String nodeName, String[] cmds, String stdoutFileName, String stderrFileName, ProcListener pl)
          Execute a list of commands on a remote node
 RemoteProcess jExec_NodeLogIO(String nodeName, String cmds, String stdoutFileName, String stderrFileName, ProcListener pl)
          Execute a command on a remote node
 RemoteProcess jExec_RelayIO(String nodeName, String[] cmds, int ioOptions, ProcListener pl)
          Execute a list of commands on a remote node
 RemoteProcess jExec_RelayIO(String nodeName, String cmds, int ioOptions, ProcListener pl)
          Execute a command on a remote node
 RemoteProcess jExec(String nodeName, String[] cmds, ProcControl pc, ProcListener pl)
          Execute a list of commands on a remote node
 RemoteProcess jExec(String nodeName, String[] cmds, ProcListener pl)
          Execute a list of commands on a remote node
 RemoteProcess jExec(String nodeName, String cmds, ProcControl pc, ProcListener pl)
          Execute a command on a remote node
 RemoteProcess jExec(String nodeName, String cmds, ProcListener pl)
          Execute a command on a remote node
 int jExecAndWait_CentralLogIO(String nodeName, String[] cmds, String stdoutFileName, String stderrFileName)
          Execute a list of commands on a remote node, and wait for returned values
 int jExecAndWait_CentralLogIO(String nodeName, String cmds, String stdoutFileName, String stderrFileName)
          Execute a command on a remote node, and wait for returned values
 int jExecAndWait_NodeLogIO(String nodeName, String[] cmds, String stdoutFileName, String stderrFileName)
          Execute a list of commands on a remote node, and wait for returned values
 int jExecAndWait_NodeLogIO(String nodeName, String cmds, String stdoutFileName, String stderrFileName)
          Execute a command on a remote node, and wait for returned values
 int jExecAndWait(String nodeName, String cmds)
          Execute a command on a remote node, and wait for returned values
 int jExecAndWait(String nodeName, String[] cmds)
          Execute a list of commands on a remote node, and wait for returned values
 int jExecAndWait(String nodeName, String[] cmds, ProcControl pc)
          Execute a list of commands on a remote node, and wait for returned values
 int jExecAndWait(String nodeName, String cmds, ProcControl pc)
          Execute a command on a remote node, and wait for returned values
protected  String jExecCmd(String cmd, String nodeName)
          Create the Java command string to execute a command on a remote node
protected  String[] jExecCmds(String[] cmds, String nodeName)
          Create an array of Java command strings to execute a list of commands on a remote node
 void mapDaemonStubs(SchedClient schedClient, EmuNode[] nodes)
          map each emuNode to the daemon stub on the remote node
 void message(ProcessID pID, Object msg)
           
 void notifyProcExit(String nodeName, int procID, int code)
           
 void reInitNodes()
           
 void stopProcess(ProcessID processID)
          Note - should remove process from ProcListenerMap...
protected static String[] stringToArgs(String argString)
           
 Object waitForMessage(ProcessID pID)
           
 Object waitForMessage(ProcessID pID, long timeoutMillis)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

emu

private EmuInterface emu
The RMI interface on the Emulator


world

private EmuWorld world
The experiment EmuWorld


nodeDaemonStubs

private DaemonInterface[] nodeDaemonStubs
The nodeDaemon Interface (stub on emulator)

See Also:
NodeDaemon

map

private HashMap map
map nodes to RMI stubs


procListenerMap

private HashMap procListenerMap
map processes to listeners


msgCenter

private MessageCenter msgCenter
The message center


execLock

private RWLock execLock

verboseDC

public static boolean verboseDC
Verbose display control

default value is false


log

protected Logger log

HostIP

protected String HostIP

JEXEC_CMD_0_HEAD

protected static final String JEXEC_CMD_0_HEAD
part of the Default Java command that starts the rmi server on the emulator

java -cp ~/emuNode/boot.jar -Djava.rmi.server.codebase=http://10.96.128.1:8180/ -Djava.rmi.security.policy=~/emuNode/java.policy -Djava.rmi.server.hostname=

See Also:
Constant Field Values

JEXEC_CMD_0_TAIL

protected static final String JEXEC_CMD_0_TAIL
See Also:
Constant Field Values

JEXEC_CMD_1_HEAD

protected static final String JEXEC_CMD_1_HEAD
part of the Default Java command that starts the rmi server on the emulator

edu.cmu.emulator.boot.NodeBoot http://10.96.128.1:8180/

See Also:
Constant Field Values

JEXEC_CMD_1_TAIL

protected static final String JEXEC_CMD_1_TAIL
See Also:
Constant Field Values

JEXEC_CMDS

protected static final String[] JEXEC_CMDS
Default Java command that starts the rmi server on the emulator

java", "-cp", "~/emuNode/boot.jar -Djava.rmi.server.codebase=http://10.96.128.1:8180/ -Djava.rmi.security.policy=~/emuNode/java.policy -Djava.rmi.server.hostname= edu.cmu.emulator.boot.NodeBoot http://10.96.128.1:8180/


JE_RMI_HOSTNAME_INDEX

protected static final int JE_RMI_HOSTNAME_INDEX
Default location of the hostname

Default value is 5

See Also:
Constant Field Values
Constructor Detail

DaemonCommunicator

public DaemonCommunicator(EmuWorld world)
Constructor.

Method Detail

jExecCmd

protected String jExecCmd(String cmd,
                          String nodeName)
Create the Java command string to execute a command on a remote node

Parameters:
cmd - - command; nodeName - the name of the remote node
Returns:
a string (java command) to execute the command on the remote node

jExecCmds

protected String[] jExecCmds(String[] cmds,
                             String nodeName)
Create an array of Java command strings to execute a list of commands on a remote node

Parameters:
cmds - - list of commands; nodeName - the name of the remote node
Returns:
a string array(java commands) that execute the command on the remote node

jExecAndWait

public int jExecAndWait(String nodeName,
                        String cmds,
                        ProcControl pc)
Execute a command on a remote node, and wait for returned values

Parameters:
cmds - - command; nodeName - the name of the remote node
Returns:
process ID
See Also:
execProcessAndWait(String nodeName, String cmds, ProcControl pc)

jExecAndWait

public int jExecAndWait(String nodeName,
                        String cmds)
Execute a command on a remote node, and wait for returned values

Parameters:
cmds - - command; nodeName - the name of the remote node
Returns:
process ID
See Also:
execProcessAndWait(String nodeName, String cmds)

jExecAndWait_NodeLogIO

public int jExecAndWait_NodeLogIO(String nodeName,
                                  String cmds,
                                  String stdoutFileName,
                                  String stderrFileName)
Execute a command on a remote node, and wait for returned values

The console output is saved on the remote node locally specified by the stdout and stderr file name

Parameters:
cmds - - command; nodeName - the name of the remote node; stdoutFileName - stdout Filename; stderrFileName - stderr Filename;
Returns:
process ID
See Also:
execProcessAndWait_NodeLogIO(String nodeName, String cmds, String stdoutFileName, String stderrFileName)

jExecAndWait_CentralLogIO

public int jExecAndWait_CentralLogIO(String nodeName,
                                     String cmds,
                                     String stdoutFileName,
                                     String stderrFileName)
Execute a command on a remote node, and wait for returned values

The console output is saved on the central controller (emucontrol-1) specified by the stdout and stderr file name

Parameters:
cmds - - command; nodeName - the name of the remote node; stdoutFileName - stdout Filename; stderrFileName - stderr Filename;
Returns:
process ID
See Also:
execProcessAndWait_CentralLogIO(String nodeName, String cmds, String stdoutFileName, String stderrFileName)

jExecAndWait

public int jExecAndWait(String nodeName,
                        String[] cmds)
Execute a list of commands on a remote node, and wait for returned values

Parameters:
cmds - - command; nodeName - the name of the remote node
Returns:
process ID
See Also:
execProcessAndWait(String nodeName, String[] cmds)

jExecAndWait

public int jExecAndWait(String nodeName,
                        String[] cmds,
                        ProcControl pc)
Execute a list of commands on a remote node, and wait for returned values

Parameters:
cmds - - command; nodeName - the name of the remote node
Returns:
process ID
See Also:
execProcessAndWait(String nodeName, String[] cmds, ProcControl pc)

jExecAndWait_NodeLogIO

public int jExecAndWait_NodeLogIO(String nodeName,
                                  String[] cmds,
                                  String stdoutFileName,
                                  String stderrFileName)
Execute a list of commands on a remote node, and wait for returned values

The console output is saved on the remote node locally specified by the stdout and stderr file name

Parameters:
cmds - - a list commands; nodeName - the name of the remote node; stdoutFileName - stdout Filename; stderrFileName - stderr Filename;
Returns:
process ID
See Also:
execProcessAndWait_NodeLogIO(String nodeName, String[] cmds, String stdoutFileName, String stderrFileName)

jExecAndWait_CentralLogIO

public int jExecAndWait_CentralLogIO(String nodeName,
                                     String[] cmds,
                                     String stdoutFileName,
                                     String stderrFileName)
Execute a list of commands on a remote node, and wait for returned values

The console output is saved on the central controller (emucontrol-1) specified by the stdout and stderr file name

Parameters:
cmds - - command array; nodeName - the name of the remote node; stdoutFileName - stdout Filename; stderrFileName - stderr Filename;
Returns:
process ID
See Also:
execProcessAndWait_CentralLogIO(String nodeName, String[] cmds, String stdoutFileName, String stderrFileName)

jExec

public RemoteProcess jExec(String nodeName,
                           String cmds,
                           ProcControl pc,
                           ProcListener pl)
Execute a command on a remote node

Parameters:
cmds - - command; nodeName - the name of the remote node; pc - process controller; pl: process listener
Returns:
no return value
See Also:
execProcess(String nodeName, String cmds, ProcControl pc, ProcListener pl)

jExec

public RemoteProcess jExec(String nodeName,
                           String cmds,
                           ProcListener pl)
Execute a command on a remote node

Parameters:
cmds - - command; nodeName - the name of the remote node; pl: process listener
Returns:
no return value
See Also:
execProcess(String nodeName, String cmds, ProcListener pl)

jExec_NodeLogIO

public RemoteProcess jExec_NodeLogIO(String nodeName,
                                     String cmds,
                                     String stdoutFileName,
                                     String stderrFileName,
                                     ProcListener pl)
Execute a command on a remote node

The console output is saved on the remote node locally specified by the stdout and stderr file name

Parameters:
cmds - - command; nodeName - the name of the remote node; stdoutFileName - stdout Filename; stderrFileName - stderr Filename; pl: process listener
Returns:
no return value
See Also:
execProcess_NodeLogIO(String nodeName, String cmds, String stdoutFileName, String stderrFileName, ProcListener pl)

jExec_CentralLogIO

public RemoteProcess jExec_CentralLogIO(String nodeName,
                                        String cmds,
                                        String stdoutFileName,
                                        String stderrFileName,
                                        ProcListener pl)
Execute a command on a remote node

The console output is saved on the central controller (emucontrol-1) specified by the stdout and stderr file name

Parameters:
cmds - - command; nodeName - the name of the remote node; stdoutFileName - stdout Filename; stderrFileName - stderr Filename; pl: process listener
Returns:
no return value
See Also:
execProcess_CentralLogIO(String nodeName, String cmds, String stdoutFileName, String stderrFileName, ProcListener pl)

jExec_RelayIO

public RemoteProcess jExec_RelayIO(String nodeName,
                                   String cmds,
                                   int ioOptions,
                                   ProcListener pl)
Execute a command on a remote node

The console output is relayed to current console (on emucontrol-1)

Parameters:
cmds - - command; nodeName - the name of the remote node; stdoutFileName - stdout Filename; stderrFileName - stderr Filename; pl: process listener
ioOptions - - 0 does not display output, 1 show console output
Returns:
no return value
See Also:
execProcess_RelayIO(String nodeName, String cmds, int ioOptions, ProcListener pl)

jExec

public RemoteProcess jExec(String nodeName,
                           String[] cmds,
                           ProcControl pc,
                           ProcListener pl)
Execute a list of commands on a remote node

Parameters:
cmds - - command; nodeName - the name of the remote node; pc - process controller; pl: process listener
Returns:
no return value
See Also:
execProcess(String nodeName, String[] cmds, ProcControl pc, ProcListener pl)

jExec

public RemoteProcess jExec(String nodeName,
                           String[] cmds,
                           ProcListener pl)
Execute a list of commands on a remote node

Parameters:
cmds - - command; nodeName - the name of the remote node; pl: process listener
Returns:
no return value
See Also:
execProcess(String nodeName, String[] cmds, ProcListener pl)

jExec_NodeLogIO

public RemoteProcess jExec_NodeLogIO(String nodeName,
                                     String[] cmds,
                                     String stdoutFileName,
                                     String stderrFileName,
                                     ProcListener pl)
Execute a list of commands on a remote node

The console output is saved on the central controller (emucontrol-1) specified by the stdout and stderr file name

Parameters:
cmds - - command array; nodeName - the name of the remote node; stdoutFileName - stdout Filename; stderrFileName - stderr Filename; pl: process listener
Returns:
no return value
See Also:
execProcess_NodeLogIO(String nodeName, String[] cmds, String stdoutFileName, String stderrFileName, ProcListener pl)

jExec_RelayIO

public RemoteProcess jExec_RelayIO(String nodeName,
                                   String[] cmds,
                                   int ioOptions,
                                   ProcListener pl)
Execute a list of commands on a remote node

The console output is relayed to current console (on emucontrol-1)

Parameters:
cmds - - command; nodeName - the name of the remote node; stdoutFileName - stdout Filename; stderrFileName - stderr Filename; pl: process listener
ioOptions - - 0 does not display output, 1 show console output
Returns:
no return value
See Also:
execProcess_RelayIO(String nodeName, String[] cmds, int ioOptions, ProcListener pl)

jExec_CentralLogIO

public RemoteProcess jExec_CentralLogIO(String nodeName,
                                        String[] cmds,
                                        String stdoutFileName,
                                        String stderrFileName,
                                        ProcListener pl)
Execute a list of commands on a remote node

The console output is saved on the central controller (emucontrol-1) specified by the stdout and stderr file name

Parameters:
cmds - - command; nodeName - the name of the remote node; stdoutFileName - stdout Filename; stderrFileName - stderr Filename; pl: process listener
Returns:
no return value
See Also:
execProcess_CentralLogIO(String nodeName, String[] cmds, String stdoutFileName, String stderrFileName, ProcListener pl)

exec

public void exec(String nodeName,
                 String cmd,
                 Boolean asynchronousObj,
                 Boolean exitOnErrorObj,
                 LogSpec logSpec)

execProcessAndWait_ConsoleIO

public int execProcessAndWait_ConsoleIO(String nodeName,
                                        String cmds)
Execute a command on a remote node, and wait for returned values

The output is displayed directly in the console (on emucontrol-1)

Parameters:
cmds - - command; nodeName - the name of the remote node;
Returns:
process ID

execProcessAndWait

public int execProcessAndWait(String nodeName,
                              String cmds,
                              ProcControl pc)
Execute a command on a remote node, and wait for returned values

Parameters:
cmds - - command; nodeName - the name of the remote node; pc: process controller
Returns:
process ID

execProcessAndWait

public int execProcessAndWait(String nodeName,
                              String cmds)
Execute a command on a remote node, and wait for returned values

Parameters:
cmds - - command; nodeName - the name of the remote node;
Returns:
process ID

execProcessAndWait_NodeLogIO

public int execProcessAndWait_NodeLogIO(String nodeName,
                                        String cmds,
                                        String stdoutFileName,
                                        String stderrFileName)
Execute a command on a remote node, and wait for returned values

The console output is saved on the remote node specified by the stdout and stderr file name

Parameters:
cmds - - command; nodeName - the name of the remote node; stdoutFileName - stdout Filename; stderrFileName - stderr Filename;
Returns:
process ID

execProcessAndWait_CentralLogIO

public int execProcessAndWait_CentralLogIO(String nodeName,
                                           String cmds,
                                           String stdoutFileName,
                                           String stderrFileName)
Execute a command on a remote node, and wait for returned values

The console output is saved on the central controller (emucontrol-1) specified by the stdout and stderr file name

Parameters:
cmds - - command; nodeName - the name of the remote node; stdoutFileName - stdout Filename; stderrFileName - stderr Filename;
Returns:
process ID

execProcessAndWait_ConsoleIO

public int execProcessAndWait_ConsoleIO(String nodeName,
                                        String cmds,
                                        int ioOptions)
Execute a command on a remote node, and wait for returned values

The output is displayed directly in the console (on emucontrol-1)

Parameters:
cmds - - command; nodeName - the name of the remote node;
ioOptions - - 0 does not display result, 1 show result
Returns:
process ID

execProcessAndWait

public int execProcessAndWait(String nodeName,
                              String[] cmds)
Execute a list of commands on a remote node, and wait for returned values

Parameters:
cmds - - command array; nodeName - the name of the remote node;
Returns:
process ID

execProcessAndWait

public int execProcessAndWait(String nodeName,
                              String[] cmds,
                              ProcControl pc)
Execute a list of commands on a remote node, and wait for returned values

Parameters:
cmds - - command array; nodeName - the name of the remote node; pc: process controller
Returns:
process ID

execProcessAndWait_NodeLogIO

public int execProcessAndWait_NodeLogIO(String nodeName,
                                        String[] cmds,
                                        String stdoutFileName,
                                        String stderrFileName)
Execute a list of commands on a remote node, and wait for returned values

The console output is saved on the remote node specified by the stdout and stderr file name

Parameters:
cmds - - command array; nodeName - the name of the remote node; stdoutFileName - stdout Filename; stderrFileName - stderr Filename;
Returns:
process ID

execProcessAndWait_CentralLogIO

public int execProcessAndWait_CentralLogIO(String nodeName,
                                           String[] cmds,
                                           String stdoutFileName,
                                           String stderrFileName)
Execute a list of commands on a remote node, and wait for returned values

The console output is saved on the central controller (emucontrol-1) specified by the stdout and stderr file name

Parameters:
cmds - - command array; nodeName - the name of the remote node; stdoutFileName - stdout Filename; stderrFileName - stderr Filename;
Returns:
process ID

execProcessAndWait_ConsoleIO

public int execProcessAndWait_ConsoleIO(String nodeName,
                                        String[] cmds,
                                        int ioOptions)
Execute a list of commands on a remote node, and wait for returned values

The output is displayed directly in the console (on emucontrol-1)

Parameters:
cmds - - command array; nodeName - the name of the remote node;
ioOptions - - 0 does not display result, 1 show result
Returns:
process ID

execProcess

public RemoteProcess execProcess(String nodeName,
                                 String cmds,
                                 ProcControl pc,
                                 ProcListener pl)
Execute a command on a remote node

Parameters:
cmds - - command; nodeName - the name of the remote node; pc: Process Controller pl: process listener
Returns:
no return value

execProcess

public RemoteProcess execProcess(String nodeName,
                                 String cmds,
                                 ProcListener pl)
Execute a command on a remote node

Parameters:
cmds - - command; nodeName - the name of the remote node; pl: process listener
Returns:
no return value

execProcess_NodeLogIO

public RemoteProcess execProcess_NodeLogIO(String nodeName,
                                           String cmds,
                                           String stdoutFileName,
                                           String stderrFileName,
                                           ProcListener pl)
Execute a command on a remote node

The output is saved on the remote node locally

Parameters:
cmds - - command; nodeName - the name of the remote node; stdoutFileName - stdout Filename; stderrFileName - stderr Filename; pl: process listener
Returns:
no return value

execProcess_CentralLogIO

public RemoteProcess execProcess_CentralLogIO(String nodeName,
                                              String cmds,
                                              String stdoutFileName,
                                              String stderrFileName)
Execute a command on a remote node

The output is saved on the central controller ( emucontrol-1)

Parameters:
cmds - - command; nodeName - the name of the remote node; stdoutFileName - stdout Filename; stderrFileName - stderr Filename;
Returns:
no return value

execProcess_CentralLogIO

public RemoteProcess execProcess_CentralLogIO(String nodeName,
                                              String cmds,
                                              String stdoutFileName,
                                              String stderrFileName,
                                              ProcListener pl)
Execute a command on a remote node

The output is saved on the central controller ( emucontrol-1)

Parameters:
cmds - - command; nodeName - the name of the remote node; stdoutFileName - stdout Filename; stderrFileName - stderr Filename; pl: process listener
Returns:
no return value

execProcess_ConsoleIO

public RemoteProcess execProcess_ConsoleIO(String nodeName,
                                           String cmds,
                                           int ioOptions,
                                           ProcListener pl)
Execute a command on a remote node

The output is displayed directly in the console (on emucontrol-1)

Parameters:
cmds - - command; nodeName - the name of the remote node; pl: process listener
ioOptions - - 0 does not display result, 1 show result
Returns:
no return value

execProcess_RelayIO

public RemoteProcess execProcess_RelayIO(String nodeName,
                                         String cmds,
                                         int ioOptions,
                                         ProcListener pl)
Execute a command on a remote node

The output is relayed to the current console

Parameters:
cmds - - command; nodeName - the name of the remote node; pl: process listener
ioOptions - - 0 does not display result, 1 show result
Returns:
no return value

execProcess

public RemoteProcess execProcess(String nodeName,
                                 String[] cmds,
                                 ProcControl pc,
                                 ProcListener pl)
Execute a list of commands on a remote node

Parameters:
cmds - - command array; nodeName - the name of the remote node; pc: process controller; pl: process listener
Returns:
no return value

execProcess

public RemoteProcess execProcess(String nodeName,
                                 String[] cmds,
                                 ProcListener pl)
Execute a list of commands on a remote node

Parameters:
cmds - - command array; nodeName - the name of the remote node; pl: process listener
Returns:
no return value

execProcess_NodeLogIO

public RemoteProcess execProcess_NodeLogIO(String nodeName,
                                           String[] cmds,
                                           String stdoutFileName,
                                           String stderrFileName,
                                           ProcListener pl)
Execute a list of commands on a remote node

The output is saved on the remote node locally

Parameters:
cmds - - command array; nodeName - the name of the remote node; stdoutFileName - stdout Filename; stderrFileName - stderr Filename; pl: process listener
Returns:
no return value

execProcess_RelayIO

public RemoteProcess execProcess_RelayIO(String nodeName,
                                         String[] cmds,
                                         int ioOptions,
                                         ProcListener pl)
Execute a list of commands on a remote node

The output is relayed to the current console

Parameters:
cmds - - command array; nodeName - the name of the remote node; pl: process listener
ioOptions - - 0 does not display result, 1 show result
Returns:
no return value

execProcess_CentralLogIO

public RemoteProcess execProcess_CentralLogIO(String nodeName,
                                              String[] cmds,
                                              String stdoutFileName,
                                              String stderrFileName,
                                              ProcListener pl)
Execute a list of commands on a remote node

The output is saved on the central controller ( emucontrol-1)

Parameters:
cmds - - command array; nodeName - the name of the remote node; stdoutFileName - stdout Filename; stderrFileName - stderr Filename; pl: process listener
Returns:
no return value

execProcess_ConsoleIO

public RemoteProcess execProcess_ConsoleIO(String nodeName,
                                           String[] cmds,
                                           int ioOptions,
                                           ProcListener pl)
Execute a list of commands on a remote node

The output is displayed directly in the console (on emucontrol-1)

Parameters:
cmds - - command array; nodeName - the name of the remote node; pl: process listener
ioOptions - - 0 does not display result, 1 show result
Returns:
no return value

finishExec

protected ProcessID finishExec(String nodeName,
                               int pID,
                               ProcListener pl)

notifyProcExit

public void notifyProcExit(String nodeName,
                           int procID,
                           int code)

stopProcess

public void stopProcess(ProcessID processID)
Note - should remove process from ProcListenerMap... And notify listeners.


mapDaemonStubs

public void mapDaemonStubs(SchedClient schedClient,
                           EmuNode[] nodes)
map each emuNode to the daemon stub on the remote node


getDaemonStub

public DaemonInterface getDaemonStub(String nodeName)
obtain the Daemon Interface for the node


stringToArgs

protected static String[] stringToArgs(String argString)

reInitNodes

public void reInitNodes()

message

public void message(ProcessID pID,
                    Object msg)

waitForMessage

public Object waitForMessage(ProcessID pID)

waitForMessage

public Object waitForMessage(ProcessID pID,
                             long timeoutMillis)


Copyright © 2013. All Rights Reserved.