|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Alarm
An alarm is something that goes off at some point in the future.
An alarm is not primed until setAlarmAction(Sleeper) is called.
setAlarmAction(Sleeper) should only be called once before
cancel() is called, and the latter should only be called once.
The alarm should not 'go off' after cancel() has been called,
however since this is a multi-threaded environment, Sleepers
should protect themselves from late calls to Sleeper.wakeUp().
| Method Summary | |
|---|---|
void |
cancel()
Prevent further calls to Sleeper.wakeUp(). |
void |
setAlarmAction(Sleeper sleeper)
Alarms need something to do when they go off. |
| Method Detail |
|---|
void setAlarmAction(Sleeper sleeper)
Sleeper.wakeUp().
sleeper - The action to awake when the alarm goes offvoid cancel()
Sleeper.wakeUp().
See the note about late calls above.
|
Copyright ¬ 2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||