public class AlarmSource extends Object
AlarmSourceCentral
to be started, which will submit the alarms to
the queueConstructor 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.
InterruptedException
public Alarm pollAlarm(int time, TimeUnit unit) throws InterruptedException
time
- unit
- InterruptedException
public void stopListening()
public void startListening()
public boolean isListening()