public class AlarmSource extends Object
AlarmSourceCentral to be started, which will submit the alarms to
the queue| Constructor and Description |
|---|
AlarmSource() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isListening() |
Alarm |
pollAlarm(int time,
TimeUnit unit) |
void |
startListening() |
void |
stopListening() |
Alarm |
takeAlarm()
Retrieves or waiting if necessary until an Alarm becomes
available.
|
public Alarm takeAlarm() throws InterruptedException
Retrieves or waiting if necessary until an Alarm becomes available.
Blocks the current thread indefinitely until the operation can succeed.
InterruptedExceptionpublic Alarm pollAlarm(int time, TimeUnit unit) throws InterruptedException
time - unit - InterruptedExceptionpublic void stopListening()
public void startListening()
public boolean isListening()