See: Description
Interface | Description |
---|---|
AlarmSourceCentralMBean |
This is the JMX interface for the AlarmSourceCentral class
|
Class | Description |
---|---|
AlarmSource |
This class establishes a listener queue for emitted alarms.
|
AlarmSourceCentral |
The consuming part of the Alarm API.
|
The Alarm Manager consumer package provides support for subscription to alarms in the NCS Alarm list.
Example: Subscription to alarms// Set up a CDB socket Socket socket = new Socket(NcsMain.getInstance().getNcsHost(), NcsMain.getInstance().getNcsPort()); Cdb cdb = new Cdb("my-alarm-source-socket", socket); // Get and start alarm source - this must only be done once per JVM AlarmSourceCentral asc = AlarmSourceCentral.getAlarmSource(100000, cdb); asc.start(); AlarmSource source = new AlarmSource(); // Collect subscribed alarms. Alarm alarm = source.takeAlarm(); while (alarm != null) { System.out.println(alarm); for (Attribute attr: alarm.getCustomAttributes()) { System.out.println(attr); } alarm = source.takeAlarm(); }