SecurityLightController
Class LightTimer

java.lang.Object
  extended by SecurityLightController.LightTimer
All Implemented Interfaces:
LightTimerInterface

public class LightTimer
extends java.lang.Object
implements LightTimerInterface

This class implements a light timer. It is used to control the timeouts associated with a given light.

Author:
schilling

Field Summary
private  LightControllerCommandInterface callback
          This variable holds the callback which is invoked when the timer expires.
private  int mydelay
          This variable holds the delay in seconds until the timer expires.
private  java.lang.Thread t
          This variable holds the thread which is to tun for this timer.
 
Constructor Summary
LightTimer(LightControllerCommandInterface callback)
           
 
Method Summary
 void startTimer(int delay)
          This method will start the timer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mydelay

private int mydelay
This variable holds the delay in seconds until the timer expires.


callback

private LightControllerCommandInterface callback
This variable holds the callback which is invoked when the timer expires.


t

private java.lang.Thread t
This variable holds the thread which is to tun for this timer.

Constructor Detail

LightTimer

public LightTimer(LightControllerCommandInterface callback)
Parameters:
callback - This is the callback for when the timer expires.
Method Detail

startTimer

public void startTimer(int delay)
Description copied from interface: LightTimerInterface
This method will start the timer.

Specified by:
startTimer in interface LightTimerInterface
Parameters:
delay - This is the delay, in seconds, for the given timer.