Class AlarmSource

Object
com.tailf.ncs.alarmman.consumer.AlarmSource

public class AlarmSource extends Object
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 Details

    • AlarmSource

      public AlarmSource()
  • Method Details

    • takeAlarm

      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.

      Returns:
      Alarm
      Throws:
      InterruptedException
    • pollAlarm

      public Alarm pollAlarm(int time, TimeUnit unit) throws InterruptedException
      Parameters:
      time -
      unit -
      Returns:
      Alarm
      Throws:
      InterruptedException
    • stopListening

      public void stopListening()
    • startListening

      public void startListening()
    • isListening

      public boolean isListening()