public class AlarmWaiter
extends java.lang.Object
implements java.lang.Runnable
| Modifier and Type | Field and Description | 
|---|---|
protected AlarmManager | 
mgr  | 
static java.lang.String | 
REVISION  | 
protected java.lang.Thread | 
thread  | 
| Constructor and Description | 
|---|
AlarmWaiter(AlarmManager mgr,
           boolean isDaemon,
           java.lang.String waiterName)
Creates a new AlarmWaiter. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
restart(long sleepUntil)
Restarts the thread for a new time to sleep until. 
 | 
void | 
run()  | 
void | 
stop()
Stops (destroy) the thread. 
 | 
void | 
triggerNow()
Trigger the next alarm now. 
 | 
void | 
update(long sleepUntil)
Updates the time to sleep. 
 | 
public static final java.lang.String REVISION
protected AlarmManager mgr
protected java.lang.Thread thread
public AlarmWaiter(AlarmManager mgr, boolean isDaemon, java.lang.String waiterName)
mgr - the Alarm ManagerisDaemon - true if the waiter thread should run as a daemon.waiterName - the name of the waiter threadpublic void update(long sleepUntil)
sleepUntil - the new time to sleep until.public void triggerNow()
public void restart(long sleepUntil)
sleepUntil - the new time to sleep until.public void stop()
public void run()
run in interface java.lang.RunnableCopyright © 2001-2018 Jalios SA. All Rights Reserved.