public class UnsupportedEnvironment extends java.lang.Object implements ProcessEnvironment
| Constructor and Description |
|---|
UnsupportedEnvironment() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Long |
getPid()
Returns the OS level PID for the current process.
|
java.io.File |
getProcessDir()
Returns the working directory of the current process.
|
java.lang.Long |
maybeGetPid()
Returns the OS level PID for the current process, or null if not available.
|
boolean |
maybeRemoveEnvironmentVariable(java.lang.String name)
Removes the given environment variable, if possible.
|
boolean |
maybeSetEnvironment(java.util.Map<java.lang.String,java.lang.String> source)
Sets the environment of this process, if possible.
|
boolean |
maybeSetEnvironmentVariable(java.lang.String name,
java.lang.String value)
Sets the given environment variable, if possible.
|
boolean |
maybeSetProcessDir(java.io.File processDir)
Sets the process working directory, if possible
|
void |
removeEnvironmentVariable(java.lang.String name)
Removes the given environment variable.
|
void |
setEnvironmentVariable(java.lang.String name,
java.lang.String value)
Sets the given environment variable.
|
void |
setProcessDir(java.io.File processDir)
Sets the process working directory.
|
public boolean maybeSetEnvironment(java.util.Map<java.lang.String,java.lang.String> source)
ProcessEnvironmentmaybeSetEnvironment in interface ProcessEnvironmentsource - The environmentpublic void removeEnvironmentVariable(java.lang.String name)
throws NativeIntegrationException
ProcessEnvironmentremoveEnvironmentVariable in interface ProcessEnvironmentname - The name of the environment variable.NativeIntegrationException - If the environment variable cannot be removed.public boolean maybeRemoveEnvironmentVariable(java.lang.String name)
ProcessEnvironmentmaybeRemoveEnvironmentVariable in interface ProcessEnvironmentname - The name of the environment variable.public void setEnvironmentVariable(java.lang.String name,
java.lang.String value)
throws NativeIntegrationException
ProcessEnvironmentsetEnvironmentVariable in interface ProcessEnvironmentname - The namevalue - The value. Can be null, which removes the environment variable.NativeIntegrationException - If the environment variable cannot be set.public boolean maybeSetEnvironmentVariable(java.lang.String name,
java.lang.String value)
ProcessEnvironmentmaybeSetEnvironmentVariable in interface ProcessEnvironmentname - The namevalue - The valuepublic java.io.File getProcessDir()
throws NativeIntegrationException
ProcessEnvironmentgetProcessDir in interface ProcessEnvironmentNativeIntegrationException - If the process directory is not available.public void setProcessDir(java.io.File processDir)
throws NativeIntegrationException
ProcessEnvironmentsetProcessDir in interface ProcessEnvironmentprocessDir - The directory.NativeIntegrationException - If process directory cannot be set.public boolean maybeSetProcessDir(java.io.File processDir)
ProcessEnvironmentmaybeSetProcessDir in interface ProcessEnvironmentprocessDir - The directory.public java.lang.Long getPid()
throws NativeIntegrationException
ProcessEnvironmentgetPid in interface ProcessEnvironmentNativeIntegrationException - If the pid is not available.public java.lang.Long maybeGetPid()
ProcessEnvironmentmaybeGetPid in interface ProcessEnvironmentCopyright © 2013. All rights reserved