Class AlarmId

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

public class AlarmId extends Object
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-problem
  • 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)
      Constructs an AlarmId with the specified managed device, alarm type, managed object, and ConfBuf specific problem.
      Parameters:
      managedDevice - The managed device
      alarmType - The alarm type identity reference
      managedObject - The managed object
      specificProblem - The specific problem as ConfBuf
  • Method Details

    • getAlarmType

      public ConfIdentityRef getAlarmType()
      Gets the alarm type identity reference.
      Returns:
      ConfIdentityRef the alarm type
    • getManagedDevice

      public ManagedDevice getManagedDevice()
      Gets the managed device associated with this alarm.
      Returns:
      ManagedDevice the managed device
    • getManagedObject

      public ManagedObject getManagedObject()
      Gets the managed object associated with this alarm.
      Returns:
      ManagedObject the managed object
    • getSpecificProblem

      public String getSpecificProblem()
      Gets the specific problem string for this alarm.
      Returns:
      String the specific problem description
    • toString

      public String toString()
      Returns a string representation of this AlarmId.
      Overrides:
      toString in class Object
      Returns:
      String formatted string containing all alarm identifier components
    • hashCode

      public int hashCode()
      Returns a hash code value for this AlarmId. The hash code is computed based on all four identifying properties.
      Overrides:
      hashCode in class Object
      Returns:
      int hash code value
    • 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