Class Watchdog

java.lang.Object
org.apache.commons.exec.Watchdog
All Implemented Interfaces:
Runnable

public class Watchdog extends Object implements Runnable
Generalization of ExecuteWatchdog.
See Also:
  • Constructor Details

  • Method Details

    • builder

      public static Watchdog.Builder builder()
      Creates a new builder.
      Returns:
      a new builder.
      Since:
      1.4.0
    • addTimeoutObserver

      Adds a TimeoutObserver.
      Parameters:
      to - a TimeoutObserver to add.
    • fireTimeoutOccured

      protected final void fireTimeoutOccured()
      Fires a timeout occurred event for each observer.
    • removeTimeoutObserver

      Removes a TimeoutObserver.
      Parameters:
      to - a TimeoutObserver to remove.
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • start

      public void start()
      Starts a new thread.
    • stop

      public void stop()
      Requests a thread stop.