Package com.tailf.ncs.alarmman.consumer
Class AlarmSource
Object
com.tailf.ncs.alarmman.consumer.AlarmSource
This class establishes a listener queue for emitted alarms. It requires the
AlarmSourceCentral
to be started, which will submit the alarms to
the queue-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
void
void
Retrieves or waiting if necessary until an Alarm becomes available.
-
Constructor Details
-
AlarmSource
public AlarmSource()
-
-
Method Details
-
takeAlarm
Retrieves or waiting if necessary until an Alarm becomes available.
Blocks the current thread indefinitely until the operation can succeed.
- Returns:
- Alarm
- Throws:
InterruptedException
-
pollAlarm
- Parameters:
time
-unit
-- Returns:
- Alarm
- Throws:
InterruptedException
-
stopListening
public void stopListening() -
startListening
public void startListening() -
isListening
public boolean isListening()
-