Class Watchdog.Builder

java.lang.Object
org.apache.commons.exec.Watchdog.Builder
All Implemented Interfaces:
Supplier<Watchdog>
Enclosing class:
Watchdog

public static final class Watchdog.Builder extends Object implements Supplier<Watchdog>
Builds ExecuteWatchdog instances.
Since:
1.4.0
  • Field Details

  • Constructor Details

    • Builder

      public Builder()
      Constructs a new instance.
  • Method Details

    • get

      public Watchdog get()
      Creates a new configured ExecuteWatchdog.
      Specified by:
      get in interface Supplier<Watchdog>
      Returns:
      a new configured ExecuteWatchdog.
    • setThreadFactory

      public Watchdog.Builder setThreadFactory(ThreadFactory threadFactory)
      Sets the thread factory.
      Parameters:
      threadFactory - the thread factory.
      Returns:
      this instance.
    • setTimeout

      public Watchdog.Builder setTimeout(Duration timeout)
      Sets the timeout duration.
      Parameters:
      timeout - the timeout duration.
      Returns:
      this instance.