Package jp.vmi.selenium.selenese
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 Summary
Modifier and Type Method Description static booleanisInterruptedByMaxTimeTimer(Thread thread)Test specified thread is interrupted.voidrun()voidstart()Schedule timer task.voidstop()stop timer and remove scheduled task.voiduncaughtException(Thread t, Throwable e)Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
-
Method Details
-
isInterruptedByMaxTimeTimer
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:
startin interfaceMaxTimeTimer
-
stop
public void stop()stop timer and remove scheduled task.- Specified by:
stopin interfaceMaxTimeTimer
-
run
public void run() -
uncaughtException
- Specified by:
uncaughtExceptionin interfaceThread.UncaughtExceptionHandler
-