Google

: Class JavaAlarm

com.bitmechanic.util
Class JavaAlarm

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--com.bitmechanic.util.JavaAlarm

public class JavaAlarm
extends java.lang.Thread

Provides a way to run a Runnable object with a timer. If the run() method does not return before timeout elapses, a TimeoutException is thrown. otherwise the constructor returns normally.


Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
JavaAlarm(java.lang.Runnable r, long timeout)
           
 
Method Summary
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JavaAlarm

public JavaAlarm(java.lang.Runnable r,
                 long timeout)
          throws TimeoutException
Method Detail

run

public void run()
Overrides:
run in class java.lang.Thread