org.directwebremoting.impl
Class OutputAlarm

java.lang.Object
  extended by org.directwebremoting.impl.BasicAlarm
      extended by org.directwebremoting.impl.OutputAlarm
All Implemented Interfaces:
Alarm

public class OutputAlarm
extends BasicAlarm
implements Alarm

An Alarm that goes off whenever output happens on a ScriptSession.

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

Constructor Summary
OutputAlarm(RealScriptSession scriptSession, int maxWaitAfterWrite)
           
 
Method Summary
 void cancel()
          Prevent further calls to Sleeper.wakeUp().
 void setAlarmAction(Sleeper sleeper)
          Alarms need something to do when they go off.
 
Methods inherited from class org.directwebremoting.impl.BasicAlarm
raiseAlarm
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutputAlarm

public OutputAlarm(RealScriptSession scriptSession,
                   int maxWaitAfterWrite)
Parameters:
scriptSession - The script session to monitor
maxWaitAfterWrite - How long do we wait after output
Method Detail

setAlarmAction

public void setAlarmAction(Sleeper sleeper)
Description copied from interface: Alarm
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().

Specified by:
setAlarmAction in interface Alarm
Overrides:
setAlarmAction in class BasicAlarm
Parameters:
sleeper - The action to awake when the alarm goes off

cancel

public void cancel()
Description copied from interface: Alarm
Prevent further calls to Sleeper.wakeUp(). See the note about late calls above.

Specified by:
cancel in interface Alarm
Overrides:
cancel in class BasicAlarm

Copyright ¬ 2005