Class ProcessOptions


  • public class ProcessOptions
    extends Object
    Options for spawning new processes.
    Author:
    Julien Viet
    • Field Detail

      • DEFAULT_ENV

        public static final Map<String,​String> DEFAULT_ENV
        The default environment variables = the current process environment variables
    • Constructor Detail

      • ProcessOptions

        public ProcessOptions()
      • 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