|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jvnet.hudson.remcom.WindowsRemoteProcessLauncher
public class WindowsRemoteProcessLauncher
Start a Windows process remotely.
This mechanism depends on the RPC and DCOM. We first remotely create a service on the target machine and starts it. This service will accept a named pipe connection, which is used to launch the process and shuttle back and forth stdin and stdout+stderr.
| Constructor Summary | |
|---|---|
WindowsRemoteProcessLauncher(String hostName,
org.jinterop.dcom.common.IJIAuthInfo credential)
|
|
| Method Summary | |
|---|---|
String |
getHostName()
Host that this launcher represents. |
Process |
launch(String command,
String workingDirectory)
Launches a process remotely. |
void |
setConnectionTimeout(int milliseconds)
Sets the connection timeout in milli-seconds. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WindowsRemoteProcessLauncher(String hostName,
org.jinterop.dcom.common.IJIAuthInfo credential)
hostName - Remote Windows host name or IP address to connect to.credential - User account on the target Windows machine. This needs to have sufficient privilege
to access administrative shares and install a service. Normally you have to be an
administrator to be able to do this.| Method Detail |
|---|
public void setConnectionTimeout(int milliseconds)
public String getHostName()
public Process launch(String command,
String workingDirectory)
throws IOException,
org.jinterop.dcom.common.JIException,
InterruptedException
The resulting Process behaves slightly differently from a normal local Process
in the following ways:
Process.getOutputStream().
This behavior is like ProcessBuilder.redirectErrorStream(true).
Process.waitFor(), Process.exitValue() will
never return an exit code.
command - Command to execute. Note that on Windows the command line argument is a single string, unlike Unix.
The implementation executes this through cmd.exe, so one can execute cmd.exe internal commands,
such as echo, copy, etc.workingDirectory - The working directory to launch the process with.
IOException
org.jinterop.dcom.common.JIException
InterruptedException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||