Valescom Java API

com.valescom.support.timer.java
Class OneShotTimer

java.lang.Object
  |
  +--com.valescom.support.event.java.EventHandler
        |
        +--com.valescom.support.timer.java.Timer
              |
              +--com.valescom.support.timer.java.OneShotTimer

public abstract class OneShotTimer
extends Timer

Responsibility:
Performing a task once, at a certain time in the future.
Usage:

new OneShotTimer(10)
{
    public final void
    handle(Event anEvent)
    {
        System.out.println("Timer goes off");
    }
}.start();

 

Constructor Summary
protected OneShotTimer(int anInterval)
           
 
Method Summary
protected  void timeout()
           
 
Methods inherited from class com.valescom.support.timer.java.Timer
delay, interval, interval, isStarted, register, restart, start, stop, subscription, unregister
 
Methods inherited from class com.valescom.support.event.java.EventHandler
handle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OneShotTimer

protected OneShotTimer(int anInterval)
Method Detail

timeout

protected final void timeout()
Overrides:
timeout in class Timer

Valescom Java API

Copyright 1998, 2003 - Valescom