Class MaxTimeActiveTimer

java.lang.Object
java.util.TimerTask
jp.vmi.selenium.selenese.MaxTimeActiveTimer
All Implemented Interfaces:
Runnable, Thread.UncaughtExceptionHandler, MaxTimeTimer

public class MaxTimeActiveTimer
extends TimerTask
implements MaxTimeTimer, Thread.UncaughtExceptionHandler
Interrupt main thread after the seconds specified by --max-time option.
  • Method Details

    • isInterruptedByMaxTimeTimer

      public static boolean isInterruptedByMaxTimeTimer​(Thread thread)
      Test specified thread is interrupted.
      Parameters:
      thread - thread object.
      Returns:
      true if the thread is interrupted.
    • start

      public void start()
      Schedule timer task.
      Specified by:
      start in interface MaxTimeTimer
    • stop

      public void stop()
      stop timer and remove scheduled task.
      Specified by:
      stop in interface MaxTimeTimer
    • run

      public void run()
      Specified by:
      run in interface Runnable
      Specified by:
      run in class TimerTask
    • uncaughtException

      public void uncaughtException​(Thread t, Throwable e)
      Specified by:
      uncaughtException in interface Thread.UncaughtExceptionHandler