de.myfoo.commonj.timers
Class OneShotTimer

java.lang.Object
  extended by de.myfoo.commonj.timers.FooTimer
      extended by de.myfoo.commonj.timers.OneShotTimer
All Implemented Interfaces:
commonj.timers.Timer

public final class OneShotTimer
extends FooTimer

A timer that expiers once and stops exeution.

Version:
1.0
Author:
Kelly

Field Summary
 
Fields inherited from class de.myfoo.commonj.timers.FooTimer
period, scheduledExcecutionTime, stopped
 
Constructor Summary
OneShotTimer(long startTime, commonj.timers.TimerListener listener)
          Creates a new instance of OneShotTimer.
 
Method Summary
protected  void computeNextExecutionTime()
          Compute the next execution time - never again.
 
Methods inherited from class de.myfoo.commonj.timers.FooTimer
cancel, execute, getPeriod, getScheduledExecutionTime, getTimerListener, isCancelled, isExpired, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OneShotTimer

public OneShotTimer(long startTime,
                    commonj.timers.TimerListener listener)
Creates a new instance of OneShotTimer.

Parameters:
startTime - start time
listener - the timer listener
Method Detail

computeNextExecutionTime

protected void computeNextExecutionTime()
Compute the next execution time - never again.

Specified by:
computeNextExecutionTime in class FooTimer
See Also:
FooTimer.computeNextExecutionTime()