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