com.ibm.rational.test.lt.kernel.util

Interface IWatchDog

  • All Known Implementing Classes:
    WatchDog


    public interface IWatchDog
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      int getTimeoutCount()
      get the number of times a timeout condition has been encountered.
      void handleTimeout(long elapsedTime)
      handleTimeout() is called whenever a timeout condition is encountered.
      void restartTimer()
      Stops the current timer and starts another.
      void setName(String name)
      Sets the watchDog's name.
      void setTimeout(int timeout)
      Set the length of time a timer will wait before the timeout condition occurs
      void start()
      starts the watchdog thread
      boolean startTimer()
      Start a timer.
      void stop()
      stops the watchdog thread
      boolean stopTimer()
      Stops the current timer.
    • Method Detail

      • setName

        void setName(String name)
        Sets the watchDog's name. The name is used when logging messages.
        Parameters:
        name -
      • setTimeout

        void setTimeout(int timeout)
        Set the length of time a timer will wait before the timeout condition occurs
        Parameters:
        timeout - milliseconds
      • startTimer

        boolean startTimer()
        Start a timer.

        If the current value of the timeOut elapses before this timer is stopped the watchdog will increment the timeoutCount and call reportTimeout()

        Returns:
        true if a timer was successfully started, false if a timer is already active or if the thread is not started.
      • stopTimer

        boolean stopTimer()
        Stops the current timer.
        Returns:
        true if the timer was successfully stopped, false if there is not an active timer.
      • restartTimer

        void restartTimer()
        Stops the current timer and starts another.
      • handleTimeout

        void handleTimeout(long elapsedTime)
        handleTimeout() is called whenever a timeout condition is encountered.
        Parameters:
        elapsedTime - the length of time after the startTimer() when the timeout was detected.
      • getTimeoutCount

        int getTimeoutCount()
        get the number of times a timeout condition has been encountered.
        Returns:
        the count of timeous encountered.
      • start

        void start()
        starts the watchdog thread
      • stop

        void stop()
        stops the watchdog thread
IBM Rational Performance Tester SDK

© Copyright IBM Corp. 2013. All rights reserved.