Package org.netxms.client.events
Class Alarm
java.lang.Object
org.netxms.client.events.Alarm
Alarm
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Get id of user that acknowledged this alarm (or 0 if alarm is not acknowledged).int
Get time when alarm was acknowledgedlong[]
Get list of categories this alarm belongs to.int
long
getDciId()
int
long
getId()
getKey()
long
int
int
Get id of user that resolved this alarm (or 0 if alarm is not resolved).Get description of Event Processing Policy rule that caused the alarmGet unique ID of Event Processing Policy rule that caused the alarmint
long
long
int
getState()
Get alarm state.int
Get alarm state bit.long[]
Get list of subordinate alarm identifiers.int
Get id of user that terminated this alarm (or 0 if alarm is not terminated).int
int
boolean
Check if this alarm has any subordinated alarms.boolean
isSticky()
void
setResolved
(int userId, Date changeTime) Mark alarm as resolved.toString()
-
Field Details
-
STATE_OUTSTANDING
public static final int STATE_OUTSTANDING- See Also:
-
STATE_ACKNOWLEDGED
public static final int STATE_ACKNOWLEDGED- See Also:
-
STATE_RESOLVED
public static final int STATE_RESOLVED- See Also:
-
STATE_TERMINATED
public static final int STATE_TERMINATED- See Also:
-
STATE_BIT_OUTSTANDING
public static final int STATE_BIT_OUTSTANDING- See Also:
-
STATE_BIT_ACKNOWLEDGED
public static final int STATE_BIT_ACKNOWLEDGED- See Also:
-
STATE_BIT_RESOLVED
public static final int STATE_BIT_RESOLVED- See Also:
-
STATE_BIT_TERMINATED
public static final int STATE_BIT_TERMINATED- See Also:
-
STATE_MASK
public static final int STATE_MASK- See Also:
-
HELPDESK_STATE_IGNORED
public static final int HELPDESK_STATE_IGNORED- See Also:
-
HELPDESK_STATE_OPEN
public static final int HELPDESK_STATE_OPEN- See Also:
-
HELPDESK_STATE_CLOSED
public static final int HELPDESK_STATE_CLOSED- See Also:
-
-
Constructor Details
-
Alarm
- Parameters:
msg
- Source NXCP message
-
-
Method Details
-
setResolved
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 alarmchangeTime
- time when alarm was resolved
-
getId
public long getId()- Returns:
- the id
-
getParentId
public long getParentId()- Returns:
- the parentId
-
getCurrentSeverity
- Returns:
- the currentSeverity
-
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
- Returns:
- the creationTime
-
getLastChangeTime
- Returns:
- the lastChangeTime
-
getMessage
- Returns:
- the message
-
getKey
- Returns:
- the key
-
getHelpdeskState
public int getHelpdeskState()- Returns:
- the helpdeskState
-
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
Get unique ID of Event Processing Policy rule that caused the alarm- Returns:
- the rule UUID
-
getRuleDescription
Get description of Event Processing Policy rule that caused the alarm- Returns:
- the rule Description
-
toString
-