|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | CONST | FIELD | CONSTR | METHOD | DETAIL: CONST | FIELD | CONSTR | METHOD | ||||||||
|
PROTOTYPE Not reviewed yet: use at your own risk! |
java.lang.Object
|
+--satin.aro.AROremoteServer
|
+--satin.remotelauncher.RemoteLauncher
public class RemoteLauncher
extends AROremoteServer
Provides facilities for performing operations on remote systems,
by communicating with the Server
program.
An object of class RemoteLauncher provides an API
to a Server running on a remote
system. The server, which must be started independently of this API,
provides facilities for launching applications and manipulating files
on the remote system.
| Fields inherited from class satin.aro.AROremoteServer |
aroLog, debugStream, defaultAROlog, defaultTimeout, server, uiLog |
| Constructor Summary | |
RemoteLauncher(java.lang.String hostName,
int port)
Constructs a remote launcher and establishes communication with a Remote Launcher server. |
|
| Method Summary | |
RemoteTestbedParamSet |
_getParams()
Returns a bag of parameters from the remote system. |
static RemoteLauncher |
connect(java.lang.String hostName,
int port)
Constructs a remote launcher and establishes communication with a Remote Launcher server. |
static RemoteLauncher |
connect(TestbedParamSet paramSet)
Constructs a remote launcher and establishes communication with a Remote Launcher server. |
void |
debug(boolean on)
Enables or disables debugging output in the RemoteLauncher server. |
RemoteProcess |
exec(java.lang.String command)
Executes the given command on the remote system. |
RemoteProcess |
exec(java.lang.String command,
java.lang.String[] envVars,
java.lang.String workingDir)
Executes the given command on the remote system. |
int |
exec(java.lang.String command,
java.lang.String[] envVars,
java.lang.String workingDir,
java.lang.StringBuffer stdOut,
java.lang.StringBuffer stdErr)
Executes the given command on the remote system and waits for it to complete. |
int |
exec(java.lang.String command,
java.lang.StringBuffer stdOut,
java.lang.StringBuffer stdErr)
Executes the given command on the remote system and waits for it to complete. |
| Methods inherited from class satin.aro.AROremoteServer |
close, exists, finalize, getClassName, getClassNames, getCumReqTime, getGlobalSubroutineNames, getMethodNames, getServerID, makeRequest, makeRequestAndThrow, makeRequestAndThrow, sleep |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RemoteLauncher(java.lang.String hostName,
int port)
throws java.io.IOException,
AROexception
connect
to construct a remote launcher object.
hostNameport| Method Detail |
public static RemoteLauncher connect(java.lang.String hostName,
int port)
throws java.io.IOException,
AROexception
public static RemoteLauncher connect(TestbedParamSet paramSet)
throws java.io.IOException,
AROexception,
ParamError
paramSet
public RemoteProcess exec(java.lang.String command)
throws java.io.IOException,
AROexception
Runtime.exec.
Note that the command is not automatically executed within a shell,
so that features like i/o redirection (using angle brackets) will
not work unless you issue a command that explicitly invokes a shell.
command
public RemoteProcess exec(java.lang.String command,
java.lang.String[] envVars,
java.lang.String workingDir)
throws java.io.IOException,
AROexception
Runtime.exec.
Note that the command is not automatically executed within a shell,
so that features like i/o redirection (using angle brackets) will
not work unless you issue a command that explicitly invokes a shell.
command
public int exec(java.lang.String command,
java.lang.StringBuffer stdOut,
java.lang.StringBuffer stdErr)
throws java.io.IOException,
AROexception
SystemUtils.exec.
Note that the command is not automatically executed within a shell,
so that features like i/o redirection (using angle brackets) will
not work unless you issue a command that explicitly invokes a shell.
RemoteLauncher rl; // initialization omitted for brevity
StringBuffer dirContents = new StringBuffer();
StringBuffer error = new StringBuffer();
if (0 != SystemUtils.exec("ls -l c:/temp", dirContents, error))
throw new Error("ls failed: " + error);
// dirContents now contains a directory listing of c:/temp
commandstdOutstdErr
public int exec(java.lang.String command,
java.lang.String[] envVars,
java.lang.String workingDir,
java.lang.StringBuffer stdOut,
java.lang.StringBuffer stdErr)
throws java.io.IOException,
AROexception
SystemUtils.exec.
Note that the command is not automatically executed within a shell,
so that features like i/o redirection (using angle brackets) will
not work unless you issue a command that explicitly invokes a shell.
RemoteLauncher rl; // initialization omitted for brevity
StringBuffer dirContents = new StringBuffer();
StringBuffer error = new StringBuffer();
if (0 != SystemUtils.exec("ls -l c:/temp", dirContents, error))
throw new Error("ls failed: " + error);
// dirContents now contains a directory listing of c:/temp
commandenvVarsname=value.
If this parameter is null, the subprocess (command)
inherits its environment from the caller.workingDirstdOutstdErr
public RemoteTestbedParamSet _getParams()
throws java.io.IOException,
AROexception
public void debug(boolean on)
throws java.io.IOException,
AROexception
on| Revision History |
7/25/01 Ed Stauff - added connect(String, int).
6/19/01 Ed Stauff - made changes per API review.
4/17/01 Ed Stauff - file created.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | CONST | FIELD | CONSTR | METHOD | DETAIL: CONST | FIELD | CONSTR | METHOD | ||||||||
RemoteLauncher.java (PRIVATE SOURCES)