Class WatchDogThread

java.lang.Object
java.lang.Thread
org.eclipse.mosaic.rti.WatchDogThread
All Implemented Interfaces:
Runnable, WatchDog

public class WatchDogThread extends Thread implements WatchDog
This thread is used to monitor a federate.
  • Constructor Details

    • WatchDogThread

      public WatchDogThread(ComponentProvider federation, int maxIdleTime)
  • Method Details

    • updateCurrentTime

      public void updateCurrentTime()
      Updates the Watchdog with the current real time.
      Specified by:
      updateCurrentTime in interface WatchDog
    • run

      public void run()
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
    • stopWatching

      public void stopWatching()
      If called the thread will terminate.
      Specified by:
      stopWatching in interface WatchDog
    • attachProcess

      public void attachProcess(Process p)
      Attaches a new process to the watchdog to be killed in case of a hang-up.
      Specified by:
      attachProcess in interface WatchDog
      Parameters:
      p - process to be attached