Package org.onosproject.alarm
Class DefaultAlarm
- java.lang.Object
-
- org.onosproject.alarm.DefaultAlarm
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDefaultAlarm.BuilderBuilder for the DefaultAlarm object.-
Nested classes/interfaces inherited from interface org.onosproject.alarm.Alarm
Alarm.SeverityLevel
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacknowledged()Returns a flag to indicate if this alarm has been acknowledged.java.lang.StringassignedUser()Returns the user to whom this alarm is assigned; this is for future use and always returns null in this release.booleancleared()Returns a flag to indicate if this alarm has been cleared.java.lang.Stringdescription()Returns a description of alarm.DeviceIddeviceId()The device to which this alarm is related.booleanequals(java.lang.Object obj)inthashCode()AlarmIdid()Returns the unique alarm id within this ONOS instance.booleanmanuallyClearable()Returns a flag to indicate if this alarm is manually-cleared by a user action within ONOS.booleanserviceAffecting()Returns true if alarm is service affecting Note: Whilst X.733 combines service-affecting state with severity (where severities of critical and major are deemed service-affecting) ONOS keeps these attributes separate.Alarm.SeverityLevelseverity()Returns the severity.AlarmEntityIdsource()Returns an entity within the context of this alarm's device.java.lang.LongtimeCleared()Returns the time when cleared.longtimeRaised()Returns the time when raised.longtimeUpdated()Returns time at which the alarm was updated most recently, due to some change in the device, or ONOS.java.lang.StringtoString()
-
-
-
Method Detail
-
id
public AlarmId id()
Description copied from interface:AlarmReturns the unique alarm id within this ONOS instance.
-
deviceId
public DeviceId deviceId()
Description copied from interface:AlarmThe device to which this alarm is related.
-
description
public java.lang.String description()
Description copied from interface:AlarmReturns a description of alarm.It may encapsulate Event Type as described by ITU Recommendation X.736 ITU, Quoting https://tools.ietf.org/html/rfc3877 these include: other, communicationsAlarm, qualityOfServiceAlarm, processingErrorAlarm, equipmentAlarm, environmentalAlarm, integrityViolation, operationalViolation, physicalViolation, securityServiceOrMechanismViolation, timeDomainViolation
It may encapsulate Probable Cause as described by ITU Recommendation X.736 ITU, Quoting https://www.iana.org/assignments/ianaitualarmtc-mib/ianaitualarmtc-mib these include : aIS, callSetUpFailure, degradedSignal, farEndReceiverFailure, framingError, and hundreds more constants.
It may encapsulate a vendor-specific description of the underlying fault.
- Specified by:
descriptionin interfaceAlarm- Returns:
- description of alarm
-
source
public AlarmEntityId source()
Description copied from interface:AlarmReturns an entity within the context of this alarm's device. It may be null if deviceId sufficiently identifies the location. As an example, the source may indicate a port number
-
timeRaised
public long timeRaised()
Description copied from interface:AlarmReturns the time when raised.- Specified by:
timeRaisedin interfaceAlarm- Returns:
- time when raised, in milliseconds since start of epoch
-
timeUpdated
public long timeUpdated()
Description copied from interface:AlarmReturns time at which the alarm was updated most recently, due to some change in the device, or ONOS. If the alarm has been cleared, this is the time at which the alarm was cleared.- Specified by:
timeUpdatedin interfaceAlarm- Returns:
- time when last updated, in milliseconds since start of epoch
-
timeCleared
public java.lang.Long timeCleared()
Description copied from interface:AlarmReturns the time when cleared. Null indicated no clear time, i.e. the alarm is still active.- Specified by:
timeClearedin interfaceAlarm- Returns:
- time when cleared, in milliseconds since start of epoch or null if uncleared.
-
severity
public Alarm.SeverityLevel severity()
Description copied from interface:AlarmReturns the severity. Note, that cleared alarms may have EITHER SeverityLevel = CLEARED, or may be not present; both scenarios should be handled.
-
serviceAffecting
public boolean serviceAffecting()
Description copied from interface:AlarmReturns true if alarm is service affecting Note: Whilst X.733 combines service-affecting state with severity (where severities of critical and major are deemed service-affecting) ONOS keeps these attributes separate.- Specified by:
serviceAffectingin interfaceAlarm- Returns:
- whether service affecting (true indicates it is)
-
acknowledged
public boolean acknowledged()
Description copied from interface:AlarmReturns a flag to indicate if this alarm has been acknowledged. All alarms are unacknowledged until and unless an ONOS user takes action to indicate so.- Specified by:
acknowledgedin interfaceAlarm- Returns:
- whether alarm is currently acknowledged (true indicates it is)
-
cleared
public boolean cleared()
Description copied from interface:AlarmReturns a flag to indicate if this alarm has been cleared. All alarms are not cleared until and unless an ONOS user or app takes action to indicate so.
-
manuallyClearable
public boolean manuallyClearable()
Description copied from interface:AlarmReturns a flag to indicate if this alarm is manually-cleared by a user action within ONOS. Some stateless events e.g. backup-failure or upgrade-failure, may be mapped by ONOS to alarms, and these may be deemed manually- clearable. The more typical case is that an alarm represents a persistent fault on or related to a device and such alarms are never manually clearable, i.e. a configuration or operational state must occur for the alarm to clear.- Specified by:
manuallyClearablein interfaceAlarm- Returns:
- whether it may be cleared by a user action (true indicates it is)
-
assignedUser
public java.lang.String assignedUser()
Description copied from interface:AlarmReturns the user to whom this alarm is assigned; this is for future use and always returns null in this release. It is anticipated that in future ONOS releases, the existing JAAS user/key/role configuration will be extended to include a mechanism whereby some groups of users may allocate alarms to other users for bookkeeping and administrative purposes, and that ONOS will additionally provide a REST based mechanism, to retrieve from JAAS, the set of users to whom alarm assignment is possible for the current user.- Specified by:
assignedUserin interfaceAlarm- Returns:
- the assigned user; always null in this release.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-