Package org.openqa.selenium.os
Class ExternalProcess.Builder
java.lang.Object
org.openqa.selenium.os.ExternalProcess.Builder
- Enclosing class:
- ExternalProcess
-
Method Summary
Modifier and TypeMethodDescriptionbufferSize
(int toKeep) The number of bytes to buffer forOsProcess#getOutput
calls.command()
Get the executable command to start the process, this consists of the binary and the arguments.Set the executable command to start the process, this consists of the executable and the arguments.Set the executable command to start the process, this consists of the executable and the arguments.Set the executable command to start the process, this consists of the executable and the arguments.copyOutputTo
(OutputStream stream) Where to copy the combined stdout and stderr output to,OsProcess#getOutput
is still working when called.Get the working directory of the process to start, maybe null.Set the working directory of the process to start.Set the working directory of the process to start.Get the environment variables of the process to start.environment
(String name, String value) Set one environment variable of the process to start, will replace the old value if exists.start()
-
Method Details
-
command
Set the executable command to start the process, this consists of the executable and the arguments.- Parameters:
executable
- the executable to build the commandarguments
- the arguments to build the command- Returns:
- this instance to continue building
-
command
Set the executable command to start the process, this consists of the executable and the arguments.- Parameters:
command
- the executable, followed by the arguments- Returns:
- this instance to continue building
-
command
Set the executable command to start the process, this consists of the executable and the arguments.- Parameters:
command
- the executable, followed by the arguments- Returns:
- this instance to continue building
-
command
Get the executable command to start the process, this consists of the binary and the arguments.- Returns:
- an editable list, changes to it will update the command executed.
-
environment
Set one environment variable of the process to start, will replace the old value if exists.- Returns:
- this instance to continue building
-
environment
Get the environment variables of the process to start.- Returns:
- an editable map, changes to it will update the environment variables of the command executed.
-
directory
Get the working directory of the process to start, maybe null.- Returns:
- the working directory
-
directory
Set the working directory of the process to start.- Parameters:
directory
- the path to the directory- Returns:
- this instance to continue building
-
directory
Set the working directory of the process to start.- Parameters:
directory
- the path to the directory- Returns:
- this instance to continue building
-
copyOutputTo
Where to copy the combined stdout and stderr output to,OsProcess#getOutput
is still working when called.- Parameters:
stream
- where to copy the combined output to- Returns:
- this instance to continue building
-
bufferSize
The number of bytes to buffer forOsProcess#getOutput
calls.- Parameters:
toKeep
- the number of bytes, default is 4096- Returns:
- this instance to continue building
-
start
- Throws:
UncheckedIOException
-