org.directwebremoting.dwrp
Class BasicAlarm

java.lang.Object
  extended by org.directwebremoting.dwrp.BasicAlarm
Direct Known Subclasses:
OutputAlarm, ShutdownAlarm, TimedAlarm

public class BasicAlarm
extends java.lang.Object

An Alarm that goes off if something is badly broken.

Author:
Joe Walker [joe at getahead dot ltd dot uk]

Constructor Summary
BasicAlarm()
           
 
Method Summary
 void cancel()
          Prevent further calls to Sleeper#wakeUp().
 void raiseAlarm()
          It's all gone wrong - inform the Sleeper
 void setAlarmAction(org.directwebremoting.dwrp.Sleeper sleeper)
          Alarms need something to do when they go off.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicAlarm

public BasicAlarm()
Method Detail

raiseAlarm

public void raiseAlarm()
It's all gone wrong - inform the Sleeper


cancel

public void cancel()
Prevent further calls to Sleeper#wakeUp(). See the note about late calls above.


setAlarmAction

public void setAlarmAction(org.directwebremoting.dwrp.Sleeper sleeper)
Alarms need something to do when they go off. After this method has been called the Alarm may 'go off', once only, by calling Sleeper#wakeUp().

Parameters:
sleeper - The action to awake when the alarm goes off

Copyright ? 2005