Class DefaultAlarm

  • All Implemented Interfaces:
    Alarm

    public final class DefaultAlarm
    extends Object
    implements Alarm
    Default implementation of an alarm.
    • Method Detail

      • id

        public AlarmId id()
        Description copied from interface: Alarm
        Returns the unique alarm id within this ONOS instance.
        Specified by:
        id in interface Alarm
        Returns:
        alarm identifier
      • deviceId

        public DeviceId deviceId()
        Description copied from interface: Alarm
        The device to which this alarm is related.
        Specified by:
        deviceId in interface Alarm
        Returns:
        a device id
      • description

        public String description()
        Description copied from interface: Alarm
        Returns 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:
        description in interface Alarm
        Returns:
        description of alarm
      • source

        public AlarmEntityId source()
        Description copied from interface: Alarm
        Returns 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
        Specified by:
        source in interface Alarm
        Returns:
        source of alarm within the alarm's referenced Device.
      • timeRaised

        public long timeRaised()
        Description copied from interface: Alarm
        Returns the time when raised.
        Specified by:
        timeRaised in interface Alarm
        Returns:
        time when raised, in milliseconds since start of epoch
      • timeUpdated

        public long timeUpdated()
        Description copied from interface: Alarm
        Returns 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:
        timeUpdated in interface Alarm
        Returns:
        time when last updated, in milliseconds since start of epoch
      • timeCleared

        public Long timeCleared()
        Description copied from interface: Alarm
        Returns the time when cleared. Null indicated no clear time, i.e. the alarm is still active.
        Specified by:
        timeCleared in interface Alarm
        Returns:
        time when cleared, in milliseconds since start of epoch or null if uncleared.
      • severity

        public Alarm.SeverityLevel severity()
        Description copied from interface: Alarm
        Returns the severity. Note, that cleared alarms may have EITHER SeverityLevel = CLEARED, or may be not present; both scenarios should be handled.
        Specified by:
        severity in interface Alarm
        Returns:
        severity of the alarm
      • serviceAffecting

        public boolean serviceAffecting()
        Description copied from interface: Alarm
        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.
        Specified by:
        serviceAffecting in interface Alarm
        Returns:
        whether service affecting (true indicates it is)
      • acknowledged

        public boolean acknowledged()
        Description copied from interface: Alarm
        Returns 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:
        acknowledged in interface Alarm
        Returns:
        whether alarm is currently acknowledged (true indicates it is)
      • cleared

        public boolean cleared()
        Description copied from interface: Alarm
        Returns 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.
        Specified by:
        cleared in interface Alarm
        Returns:
        whether alarm is currently cleared (true indicates it is)
      • manuallyClearable

        public boolean manuallyClearable()
        Description copied from interface: Alarm
        Returns 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:
        manuallyClearable in interface Alarm
        Returns:
        whether it may be cleared by a user action (true indicates it is)
      • assignedUser

        public String assignedUser()
        Description copied from interface: Alarm
        Returns 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:
        assignedUser in interface Alarm
        Returns:
        the assigned user; always null in this release.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object