|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rubygrapefruit.platform.internal.WrapperProcess
public class WrapperProcess
A Process
implementation that wraps another to add thread-safety and to update the JVM's internal view of
various process properties.
Constructor Summary | |
---|---|
WrapperProcess(Process process,
boolean windows)
|
Method Summary | |
---|---|
java.lang.String |
getEnvironmentVariable(java.lang.String name)
Get the value of an environment variable. |
int |
getProcessId()
Returns the process identifier. |
java.io.File |
getWorkingDirectory()
Returns the process' current working directory. |
void |
setEnvironmentVariable(java.lang.String name,
java.lang.String value)
Sets the value of an environment variable. |
void |
setWorkingDirectory(java.io.File directory)
Sets the process' working directory. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public WrapperProcess(Process process, boolean windows)
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public int getProcessId() throws NativeException
Process
getProcessId
in interface Process
NativeException
- On failure.public java.io.File getWorkingDirectory() throws NativeException
Process
getWorkingDirectory
in interface Process
NativeException
- On failure.public void setWorkingDirectory(java.io.File directory) throws NativeException
Process
setWorkingDirectory
in interface Process
NativeException
- On failure.public java.lang.String getEnvironmentVariable(java.lang.String name) throws NativeException
Process
getEnvironmentVariable
in interface Process
NativeException
- On failure.public void setEnvironmentVariable(java.lang.String name, java.lang.String value) throws NativeException
Process
setEnvironmentVariable
in interface Process
value
- the new value. Use null or an empty string to remove the environment variable. Note that on some
platforms it is not possible to remove the environment variable safely. On such platforms, the value is set to an
empty string instead.
NativeException
- On failure.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |