Package io.reactiverse.childprocess
Class ProcessOptions
- java.lang.Object
-
- io.reactiverse.childprocess.ProcessOptions
-
public class ProcessOptions extends Object
Options for spawning new processes.- Author:
- Julien Viet
-
-
Field Summary
Fields Modifier and Type Field Description static Map<String,String>DEFAULT_ENVThe default environment variables = the current process environment variables
-
Constructor Summary
Constructors Constructor Description ProcessOptions()ProcessOptions(ProcessOptions that)ProcessOptions(JsonObject json)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCwd()Map<String,String>getEnv()ProcessOptionssetCwd(String cwd)Set the child process current working directory.ProcessOptionssetEnv(Map<String,String> env)Set the child process environment variables as key-value pairs.JsonObjecttoJson()
-
-
-
Constructor Detail
-
ProcessOptions
public ProcessOptions()
-
ProcessOptions
public ProcessOptions(ProcessOptions that)
-
ProcessOptions
public ProcessOptions(JsonObject json)
-
-
Method Detail
-
getEnv
public Map<String,String> getEnv()
- Returns:
- the current options environment variables as key-value pairs
-
setEnv
public ProcessOptions setEnv(Map<String,String> env)
Set the child process environment variables as key-value pairs.- Parameters:
env- the env variables- Returns:
- a reference to this, so the API can be used fluently
-
getCwd
public String getCwd()
- Returns:
- the child process current working directory
-
setCwd
public ProcessOptions setCwd(String cwd)
Set the child process current working directory.- Parameters:
cwd- the current working directory- Returns:
- a reference to this, so the API can be used fluently
-
toJson
public JsonObject toJson()
-
-