org.clazzes.util.thread
Class ThreadTimer

java.lang.Object
  extended by java.util.TimerTask
      extended by org.clazzes.util.thread.ThreadTimer
All Implemented Interfaces:
java.lang.Runnable

public class ThreadTimer
extends java.util.TimerTask

Author:
andreas Helper class for a timed thread execution. This class is called by the Timer It invokes run(), which starts the Thread.

Constructor Summary
ThreadTimer(TimedThread thread)
          contructes the object and sets the thread to run
 
Method Summary
 boolean isToBeFinished()
           
 void requestStop()
           
 void run()
           
 void waitToBeFinished()
           
 
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadTimer

public ThreadTimer(TimedThread thread)
contructes the object and sets the thread to run

Parameters:
thread -
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable
Specified by:
run in class java.util.TimerTask

requestStop

public void requestStop()

isToBeFinished

public boolean isToBeFinished()
Returns:

waitToBeFinished

public void waitToBeFinished()
                      throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException


Copyright © 2010. All Rights Reserved.