Package org.apache.commons.exec
Class DefaultExecutor.Builder<T extends DefaultExecutor.Builder<T>>
java.lang.Object
org.apache.commons.exec.DefaultExecutor.Builder<T>
- Type Parameters:
T
- The builder type.
- All Implemented Interfaces:
Supplier<DefaultExecutor>
- Direct Known Subclasses:
DaemonExecutor.Builder
- Enclosing class:
DefaultExecutor
public static class DefaultExecutor.Builder<T extends DefaultExecutor.Builder<T>>
extends Object
implements Supplier<DefaultExecutor>
Constructs a new builder.
- Since:
- 1.4.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionget()
Creates a new configured DefaultExecutor.setExecuteStreamHandler
(ExecuteStreamHandler executeStreamHandler) Sets the PumpStreamHandler.setThreadFactory
(ThreadFactory threadFactory) Sets the ThreadFactory.setWorkingDirectory
(File workingDirectory) Sets the working directory.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
get
Creates a new configured DefaultExecutor.- Specified by:
get
in interfaceSupplier<T extends DefaultExecutor.Builder<T>>
- Returns:
- a new configured DefaultExecutor.
-
setExecuteStreamHandler
Sets the PumpStreamHandler.- Parameters:
executeStreamHandler
- the ExecuteStreamHandler, null resets to the default.- Returns:
- this.
-
setThreadFactory
Sets the ThreadFactory.- Parameters:
threadFactory
- the ThreadFactory, null resets to the default.- Returns:
- this.
-
setWorkingDirectory
Sets the working directory.- Parameters:
workingDirectory
- the working directory., null resets to the default.- Returns:
- this.
-