Class AlarmSink

Object
com.tailf.ncs.alarmman.producer.AlarmSink

public class AlarmSink extends Object
The class AlarmSink represents a "sink" where Alarm objects are added in order to be written to the alarm table.

The AlarmSinkrelieves the user of writing directly into the alarm table.

An AlarmSink can be created in two ways: stand alone or through AlarmSinkCentral.

  • Stand alone In this mode AlarmSink is created with a Maapi object which is used when writing to the alarm list.
  • Through AlarmSinkCentral In this mode, writing is handled by a proxy before it is written to the alarm list. The AlarmSink is created with its default constructor and submitting is always done indirectly through the AlarmSinkCentral which is always started in an NCS JVM.
  • Constructor Details

    • AlarmSink

      @Deprecated public AlarmSink(Cdb cdb)
      Deprecated.
      Construct an AlarmSink using the given Cdb object for writing alarms directly. Note: This constructor shall be the preferred constructor used if you are not writing alarms inside the NCS JVM i.e in a package component.

      The AlarmSink is standalone and does not use the AlarmSinkCentral.

      Parameters:
      cdb - object to be used for writing alarms
    • AlarmSink

      public AlarmSink(Maapi maapi) throws NavuException
      Construct an AlarmSink using the given Maapi object for writing alarms directly to the alarm list. Note: This constructor shall be the preferred constructor used if you are not writing alarms inside the NCS JVM i.e in a package component.

      The AlarmSink is standalone and does not use the AlarmSinkCentral.

      Parameters:
      maapi - object to be used for writing alarms
      Throws:
      NavuException
    • AlarmSink

      public AlarmSink()
      Constructs an AlarmSink. This sink writes alarms to the NCS indirectly using the central AlarmSinkCentral.

      Note: This constructor shall be the preferred constructor used if you are writing alarms inside the NCS JVM i.e in a package component.

  • Method Details

    • submitAlarm

      public void submitAlarm(Alarm alarm) throws NavuException, ConfException, IOException
      Submits the specified Alarm into the alarm list. If the alarm's key "managedDevice, managedObject, alarmType, specificProblem" already exists, the existing alarm will be updated with a new status change entry.
      Parameters:
      alarm - The alarm to be written to the alarm list
      Throws:
      NavuException
      ConfException
      IOException
    • submitAlarm

      public boolean submitAlarm(ManagedDevice managedDevice, ManagedObject managedObject, ConfIdentityRef alarmtype, ConfBuf specificProblem, PerceivedSeverity severity, String alarmText, List<ManagedObject> impactedObjects, List<AlarmId> relatedAlarms, List<ManagedObject> rootCauseObjects, ConfDatetime timeStamp, Attribute... customAttributes) throws NavuException, ConfException, IOException
      Submits the specified Alarm into the alarm list. If the alarm's key "managedDevice, managedObject, alarmType, specificProblem" already exists, the existing alarm will be updated with a new status change entry. Alarm identity:
      Parameters:
      managedDevice - the managed device which emits the alarm.
      managedObject - the managed object emitting the alarm.
      alarmtype - the alarm type of the alarm.
      specificProblem - is used when the alarmtype cannot uniquely identify the alarm type. Normally, this is not the case, and this leaf is the empty string. Status change within the alarm:
      severity - the severity of the alarm.
      alarmText - the alarm text
      impactedObjects - Objects that might be affected by this alarm
      relatedAlarms - Alarms related to this alarm
      rootCauseObjects - Objects that are candidates for causing the alarm.
      timeStamp - The time the status of the alarm changed, as reported by the device
      customAttributes - Custom attributes
      Returns:
      boolean true/false wheather the submitting the specified alarm was successful
      Throws:
      IOException
      ConfException
      NavuException
    • submitAlarm

      public boolean submitAlarm(ManagedDevice managedDevice, ManagedObject managedObject, ConfIdentityRef alarmtype, ConfBuf specificProblem, PerceivedSeverity severity, ConfBuf alarmText, List<ManagedObject> impactedObjects, List<AlarmId> relatedAlarms, List<ManagedObject> rootCauseObjects, ConfDatetime timeStamp, Attribute... customAttributes) throws NavuException, ConfException, IOException
      Submits the specified Alarm into the alarm list. If the alarms key "managedDevice, managedObject, alarmType, specificProblem" already exists, the existing alarm will be updated with a new status change entry. Alarm identity:
      Parameters:
      managedDevice - the managed device which emits the alarm.
      managedObject - the managed object emitting the alarm.
      alarmtype - the alarm type of the alarm.
      specificProblem - is used when the alarmtype cannot uniquely identify the alarm type. Normally, this is not the case, and this leaf is the empty string. Status change within the alarm:
      severity - the severity of the alarm.
      alarmText - the alarm text
      impactedObjects - Objects that might be affected by this alarm
      relatedAlarms - Alarms related to this alarm
      rootCauseObjects - Objects that are candidates for causing the alarm.
      timeStamp - The time the status of the alarm changed, as reported by the device
      customAttributes - Custom attributes
      Returns:
      boolean true/false wheather the submitting the specified alarm was successful
      Throws:
      IOException
      ConfException
      NavuException