Package org.eclipse.mosaic.rti
Class WatchDogThread
java.lang.Object
java.lang.Thread
org.eclipse.mosaic.rti.WatchDogThread
This thread is used to monitor a federate.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAttaches a new process to the watchdog to be killed in case of a hang-up.voidrun()voidIf called the thread will terminate.voidUpdates the Watchdog with the current real time.Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Constructor Details
-
WatchDogThread
-
-
Method Details
-
updateCurrentTime
public void updateCurrentTime()Updates the Watchdog with the current real time.- Specified by:
updateCurrentTimein interfaceWatchDog
-
run
public void run() -
stopWatching
public void stopWatching()If called the thread will terminate.- Specified by:
stopWatchingin interfaceWatchDog
-
attachProcess
Attaches a new process to the watchdog to be killed in case of a hang-up.- Specified by:
attachProcessin interfaceWatchDog- Parameters:
p- process to be attached
-