org.mbari.siam.core
Class AlarmClock

java.lang.Object
  extended by org.mbari.siam.core.AlarmClock

public class AlarmClock
extends java.lang.Object

AlarmClock lets a service thread go to sleep in such a way that SleepManager could also put the processor to sleep while the service thread is sleeping, but the processor will wake up in time for the thread wakeup.


Field Summary
static java.lang.String SCHEDULE_NAME
           
 
Constructor Summary
AlarmClock(DeviceService service)
           
 
Method Summary
 void snooze(int seconds)
          Put thread to sleep for specified seconds; indicate to SleepManager that processor could also sleep for duration of the thread's sleep.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SCHEDULE_NAME

public static final java.lang.String SCHEDULE_NAME
See Also:
Constant Field Values
Constructor Detail

AlarmClock

public AlarmClock(DeviceService service)
           throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

snooze

public void snooze(int seconds)
            throws java.lang.InterruptedException
Put thread to sleep for specified seconds; indicate to SleepManager that processor could also sleep for duration of the thread's sleep. Throw InterruptedException if the thread is interrupted during Thread.sleep().

Throws:
java.lang.InterruptedException


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.