Package com.tailf.ncs.alarmman.common
Class AlarmId
Object
com.tailf.ncs.alarmman.common.AlarmId
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 Summary
ConstructorsConstructorDescriptionAlarmId(ManagedDevice managedDevice, ConfIdentityRef alarmType, ManagedObject managedObject) Constructs anAlarmIdwithspecificProblemset to the empty string "".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.AlarmId(ManagedDevice managedDevice, ConfIdentityRef alarmType, ManagedObject managedObject, String specificProblem) Constructs anAlarmIdwith the specified properties. - 
Method Summary
Modifier and TypeMethodDescriptionbooleanA unique Alarm instance is the combination of aManagedDevice, aManagedObject, an alarm-type (ConfIdentityRef) and a specific-problem (ConfBuf).Gets the alarm type identity reference.Gets the managed device associated with this alarm.Gets the managed object associated with this alarm.Gets the specific problem string for this alarm.inthashCode()Returns a hash code value for this AlarmId.toString()Returns a string representation of this AlarmId. 
- 
Constructor Details
- 
AlarmId
Constructs anAlarmIdwithspecificProblemset to the empty string "".- Parameters:
 managedDevice- The managed devicealarmType- Alarm typemanagedObject- The managed object
 - 
AlarmId
public AlarmId(ManagedDevice managedDevice, ConfIdentityRef alarmType, ManagedObject managedObject, String specificProblem) Constructs anAlarmIdwith the specified properties.- Parameters:
 managedDevice- The managed devicealarmType- Alarm typemanagedObject- The managed objectspecificProblem- 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 devicealarmType- The alarm type identity referencemanagedObject- The managed objectspecificProblem- The specific problem as ConfBuf
 
 - 
 - 
Method Details
- 
getAlarmType
Gets the alarm type identity reference.- Returns:
 - ConfIdentityRef the alarm type
 
 - 
getManagedDevice
Gets the managed device associated with this alarm.- Returns:
 - ManagedDevice the managed device
 
 - 
getManagedObject
Gets the managed object associated with this alarm.- Returns:
 - ManagedObject the managed object
 
 - 
getSpecificProblem
Gets the specific problem string for this alarm.- Returns:
 - String the specific problem description
 
 - 
toString
Returns a string representation of this AlarmId. - 
hashCode
public int hashCode()Returns a hash code value for this AlarmId. The hash code is computed based on all four identifying properties. - 
equals
A unique Alarm instance is the combination of a
ManagedDevice, aManagedObject, an alarm-type (ConfIdentityRef) and a specific-problem (ConfBuf).This method compares the specified object with this AlarmId for equality. Returns
trueif 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 returnsfalse; if so, it compares managedDevice, managedObject, alarmType and specificProblem. If any one of these comparisons returnsfalse, this method returnsfalse, otherwise it returnstrue. 
 -