Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

ro.nolimits.rue.util
Class OffsetTimer  view OffsetTimer download OffsetTimer.java

java.lang.Object
  extended byjava.lang.Thread
      extended byro.nolimits.rue.util.Timer
          extended byro.nolimits.rue.util.OffsetTimer
All Implemented Interfaces:
java.lang.Runnable

public class OffsetTimer
extends Timer

Extends the Timer class implementing TimeoutException and Listener

Version:
$Revision: 0.5.1.1 $ $Date: 2000/08/01 10:52:46 $

Nested Class Summary
 
Nested classes inherited from class java.lang.Thread
java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
private  java.util.Vector _listenerItems
           
 
Fields inherited from class ro.nolimits.rue.util.Timer
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
OffsetTimer(long time)
          Creates a timer of a specified lenght
 
Method Summary
 void addTimeoutListener(TimeoutListener timeList)
          Adds the specified TimeoutListener to receive TimeoutEvents from this timer.
private  void dispatchTimeoutEvent()
           
 void removeTimeoutListener(TimeoutListener timeList)
          Removes the specified TimeoutListener from receiveing TimeoutEvents from this timer.
 void timeout()
          This method is called when the timeout occurs.
 
Methods inherited from class ro.nolimits.rue.util.Timer
getRate, reset, run, setRate, stopIt
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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
 

Field Detail

_listenerItems

private java.util.Vector _listenerItems
Constructor Detail

OffsetTimer

public OffsetTimer(long time)
Creates a timer of a specified lenght

Method Detail

addTimeoutListener

public void addTimeoutListener(TimeoutListener timeList)
Adds the specified TimeoutListener to receive TimeoutEvents from this timer. If it's null IllegalArgumentException is thrown.


removeTimeoutListener

public void removeTimeoutListener(TimeoutListener timeList)
Removes the specified TimeoutListener from receiveing TimeoutEvents from this timer. If it's null IllegalArgumentException is thrown.


dispatchTimeoutEvent

private void dispatchTimeoutEvent()

timeout

public void timeout()
This method is called when the timeout occurs. You can overrid it but don't forget to call super.timeout() in order to generate the timeout events.

Overrides:
timeout in class Timer