Class Watchdog.Builder
java.lang.Object
org.apache.commons.exec.Watchdog.Builder
- Enclosing class:
Watchdog
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final DurationDefault timeout.private ThreadFactoryThread factory.private DurationTimeout duration. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget()Creates a new configured ExecuteWatchdog.setThreadFactory(ThreadFactory threadFactory) Sets the thread factory.setTimeout(Duration timeout) Sets the timeout duration.
-
Field Details
-
DEFAULT_TIMEOUT
Default timeout. -
threadFactory
Thread factory. -
timeout
Timeout duration.
-
-
Constructor Details
-
Builder
public Builder()Constructs a new instance.
-
-
Method Details
-
get
-
setThreadFactory
Sets the thread factory.- Parameters:
threadFactory- the thread factory, null resets to the defaultExecutors.defaultThreadFactory().- Returns:
thisinstance.
-
setTimeout
Sets the timeout duration.- Parameters:
timeout- the timeout duration, null resets to the default 30 seconds timeout.- Returns:
thisinstance.
-