Class AlarmId

Object
com.tailf.ncs.alarmman.common.AlarmId

public class AlarmId extends Object
This class represents the unique identity of an NCS alarm. An NCS alarm is uniquely identified by the following properties:
  • managed-device
  • alarm-type
  • managed-object
  • specific-ṕroblem
  • Constructor Details

    • AlarmId

      public AlarmId(ManagedDevice managedDevice, ConfIdentityRef alarmType, ManagedObject managedObject)
      Constructs an AlarmId with specificProblem set to the empty string "".
      Parameters:
      managedDevice - The managed device
      alarmType - Alarm type
      managedObject - The managed object
    • AlarmId

      public AlarmId(ManagedDevice managedDevice, ConfIdentityRef alarmType, ManagedObject managedObject, String specificProblem)
      Constructs an AlarmId with the specified properties.
      Parameters:
      managedDevice - The managed device
      alarmType - Alarm type
      managedObject - The managed object
      specificProblem - The Specific problem
    • AlarmId

      public AlarmId(ManagedDevice managedDevice, ConfIdentityRef alarmType, ManagedObject managedObject, ConfBuf specificProblem)
  • Method Details

    • getAlarmType

      public ConfIdentityRef getAlarmType()
      Returns:
      ConfIdentityRef
    • getManagedDevice

      public ManagedDevice getManagedDevice()
      Returns:
      ManagedDevice
    • getManagedObject

      public ManagedObject getManagedObject()
      Returns:
      ManagedObject
    • getSpecificProblem

      public String getSpecificProblem()
      Returns:
      String
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      String
    • equals

      public boolean equals(Object o)

      A unique Alarm instance is the combination of a ManagedDevice, a ManagedObject, an alarm-type (ConfIdentityRef) and a specific-problem (ConfBuf).

      This method compares the specified object with this AlarmId for equality. Returns true if and only if the specified object is also an AlarmId and the four properties also test true for equality.

      Specifically, this implementation first checks if the specified object is this AlarmId. If so, it returns true; if not, it checks if the specified object is an AlarmId. If not, it returns false; if so, it compares managedDevice, managedObject, alarmType and specificProblem. If any one of these comparisons returns false, this method returns false, otherwise it returns true.

      Overrides:
      equals in class Object
      Parameters:
      o - the object to be compared for equality with this AlarmId
      Returns:
      true if the specified object is equal to this AlarmId