|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.util.ProcessTree.OSProcess
public abstract class ProcessTree.OSProcess
Represents a process.
Method Summary | ||
---|---|---|
|
act(ProcessTree.ProcessCallable<T> callable)
Executes a chunk of code at the same machine where this process resides. |
|
abstract List<String> |
getArguments()
Gets the command-line arguments of this process. |
|
List<ProcessTree.OSProcess> |
getChildren()
Immediate child processes. |
|
abstract EnvVars |
getEnvironmentVariables()
Obtains the environment variables of this process. |
|
abstract ProcessTree.OSProcess |
getParent()
Gets the parent process. |
|
int |
getPid()
|
|
boolean |
hasMatchingEnvVars(Map<String,String> modelEnvVar)
Given the environment variable of a process and the "model environment variable" that Hudson used for launching the build, returns true if there's a match (which means the process should be considered a descendant of a build.) |
|
abstract void |
kill()
Kills this process. |
|
abstract void |
killRecursively()
Kills this process and all the descendants. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public final int getPid()
getPid
in interface ProcessTreeRemoting.IOSProcess
public abstract ProcessTree.OSProcess getParent()
getParent
in interface ProcessTreeRemoting.IOSProcess
public final List<ProcessTree.OSProcess> getChildren()
public abstract void kill() throws InterruptedException
kill
in interface ProcessTreeRemoting.IOSProcess
InterruptedException
public abstract void killRecursively() throws InterruptedException
Note that the notion of "descendants" is somewhat vague, in the presence of such things like daemons. On platforms where the recursive operation is not supported, this just kills the current process.
killRecursively
in interface ProcessTreeRemoting.IOSProcess
InterruptedException
public abstract List<String> getArguments()
On Windows, where the OS models command-line arguments as a single string, this method computes the approximated tokenization.
getArguments
in interface ProcessTreeRemoting.IOSProcess
public abstract EnvVars getEnvironmentVariables()
getEnvironmentVariables
in interface ProcessTreeRemoting.IOSProcess
public final boolean hasMatchingEnvVars(Map<String,String> modelEnvVar)
public <T> T act(ProcessTree.ProcessCallable<T> callable) throws IOException, InterruptedException
act
in interface ProcessTreeRemoting.IOSProcess
IOException
InterruptedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |