Class Alarm

java.lang.Object
org.netxms.client.events.Alarm

public class Alarm extends Object
Alarm
  • Field Details

  • Constructor Details

    • Alarm

      public Alarm(NXCPMessage msg)
      Parameters:
      msg - Source NXCP message
  • Method Details

    • setResolved

      public void setResolved(int userId, Date changeTime)
      Mark alarm as resolved. This call only updates local object state and do not change actual alarm state on server. It can be used to update local alarm objects after receiving bulk alarm state change notification.
      Parameters:
      userId - ID of user that resolve this alarm
      changeTime - time when alarm was resolved
    • getId

      public long getId()
      Returns:
      the id
    • getParentId

      public long getParentId()
      Returns:
      the parentId
    • getCurrentSeverity

      public Severity getCurrentSeverity()
      Returns:
      the currentSeverity
    • getOriginalSeverity

      public Severity getOriginalSeverity()
      Returns:
      the originalSeverity
    • getRepeatCount

      public int getRepeatCount()
      Returns:
      the repeatCount
    • getState

      public int getState()
      Get alarm state.
      Returns:
      alarm state
    • getStateBit

      public int getStateBit()
      Get alarm state bit. It can be used to match against state filter bit mask.
      Returns:
      alarm state bit
    • getAcknowledgedByUser

      public int getAcknowledgedByUser()
      Get id of user that acknowledged this alarm (or 0 if alarm is not acknowledged).
      Returns:
      id of user that acknowledged this alarm (or 0 if alarm is not acknowledged)
    • getTerminatedByUser

      public int getTerminatedByUser()
      Get id of user that terminated this alarm (or 0 if alarm is not terminated).
      Returns:
      id of user that terminated this alarm (or 0 if alarm is not terminated)
    • getSourceEventId

      public long getSourceEventId()
      Returns:
      the sourceEventId
    • getSourceEventCode

      public int getSourceEventCode()
      Returns:
      the sourceEventCode
    • getSourceObjectId

      public long getSourceObjectId()
      Returns:
      the sourceObjectId
    • getDciId

      public long getDciId()
      Returns:
      the dciId
    • getCreationTime

      public Date getCreationTime()
      Returns:
      the creationTime
    • getLastChangeTime

      public Date getLastChangeTime()
      Returns:
      the lastChangeTime
    • getMessage

      public String getMessage()
      Returns:
      the message
    • getKey

      public String getKey()
      Returns:
      the key
    • getHelpdeskState

      public int getHelpdeskState()
      Returns:
      the helpdeskState
    • getHelpdeskReference

      public String getHelpdeskReference()
      Returns:
      the helpdeskReference
    • getTimeout

      public int getTimeout()
      Returns:
      the timeout
    • getTimeoutEvent

      public int getTimeoutEvent()
      Returns:
      the timeoutEvent
    • getCommentsCount

      public int getCommentsCount()
      Returns:
      the commentsCount
    • getResolvedByUser

      public int getResolvedByUser()
      Get id of user that resolved this alarm (or 0 if alarm is not resolved).
      Returns:
      id of user that resolved this alarm (or 0 if alarm is not resolved)
    • isSticky

      public boolean isSticky()
      Returns:
      the sticky
    • getAckTime

      public int getAckTime()
      Get time when alarm was acknowledged
      Returns:
      time when alarm was acknowledged
    • getCategories

      public long[] getCategories()
      Get list of categories this alarm belongs to.
      Returns:
      list of categories this alarm belongs to
    • getSubordinateAlarms

      public long[] getSubordinateAlarms()
      Get list of subordinate alarm identifiers.
      Returns:
      list of subordinate alarm identifiers
    • hasSubordinatedAlarms

      public boolean hasSubordinatedAlarms()
      Check if this alarm has any subordinated alarms.
      Returns:
      true if this alarm has any subordinated alarms
    • getRuleId

      public UUID getRuleId()
      Get unique ID of Event Processing Policy rule that caused the alarm
      Returns:
      the rule UUID
    • getRuleDescription

      public String getRuleDescription()
      Get description of Event Processing Policy rule that caused the alarm
      Returns:
      the rule Description
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also: