Package com.tailf.ncs.alarmman.producer
Class AlarmSink
Object
com.tailf.ncs.alarmman.producer.AlarmSink
The class
AlarmSink
represents a "sink" where
Alarm
objects are added in order to be written to the
alarm table.
The AlarmSink
relieves 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 aMaapi
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. TheAlarmSink
is created with its default constructor and submitting is always done indirectly through theAlarmSinkCentral
which is always started in an NCS JVM.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
submitAlarm
(Alarm alarm) Submits the specifiedAlarm
into the alarm list.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) Submits the specifiedAlarm
into the alarm list.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) Submits the specifiedAlarm
into the alarm list.
-
Constructor Details
-
AlarmSink
Deprecated.Construct anAlarmSink
using the givenCdb
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 theAlarmSinkCentral
.- Parameters:
cdb
- object to be used for writing alarms
-
AlarmSink
Construct anAlarmSink
using the givenMaapi
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 theAlarmSinkCentral
.- Parameters:
maapi
- object to be used for writing alarms- Throws:
NavuException
-
AlarmSink
public AlarmSink()Constructs anAlarmSink
. This sink writes alarms to the NCS indirectly using the centralAlarmSinkCentral
.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
Submits the specifiedAlarm
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 specifiedAlarm
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 textimpactedObjects
- Objects that might be affected by this alarmrelatedAlarms
- Alarms related to this alarmrootCauseObjects
- Objects that are candidates for causing the alarm.timeStamp
- The time the status of the alarm changed, as reported by the devicecustomAttributes
- 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 specifiedAlarm
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 textimpactedObjects
- Objects that might be affected by this alarmrelatedAlarms
- Alarms related to this alarmrootCauseObjects
- Objects that are candidates for causing the alarm.timeStamp
- The time the status of the alarm changed, as reported by the devicecustomAttributes
- Custom attributes- Returns:
- boolean true/false wheather the submitting the specified alarm was successful
- Throws:
IOException
ConfException
NavuException
-