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-timeoption.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods 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 Detail
-
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:
startin interfaceMaxTimeTimer
-
stop
public void stop()
stop timer and remove scheduled task.- Specified by:
stopin interfaceMaxTimeTimer
-
uncaughtException
public void uncaughtException(Thread t, Throwable e)
- Specified by:
uncaughtExceptionin interfaceThread.UncaughtExceptionHandler
-
-