public class AlertEvent extends EventObject
AlertService to notify listeners of raised or cleared alerts.| Modifier and Type | Class and Description |
|---|---|
static class |
AlertEvent.AlertEventType
Enumeration of alert event types.
|
source| Constructor and Description |
|---|
AlertEvent(String source,
Alert alert,
RaisedAlertSummary summary,
AlertEvent.AlertEventType type)
Constructor for events triggered by a raised alert.
|
AlertEvent(String source,
String[] clearedIDs,
RaisedAlertSummary summary,
AlertEvent.AlertEventType type)
Constructor for events triggered by cleared alerts.
|
| Modifier and Type | Method and Description |
|---|---|
Alert |
getAlert()
Returns the
Alert that triggered this event. |
List<String> |
getClearedIds()
Returns the list of cleared IDs.
|
AlertState |
getLevel()
Returns the level (
WARNING or ALARM) at which the alert that triggered this
event was raised. |
String |
getSource()
Returns the source of the alert that triggered this event.
|
AlertState |
getStateForClearedAlert(String id)
Get the AlertState for the provided alert id.
|
RaisedAlertSummary |
getSummary()
Returns the current summary of alerts for the source of the alert that triggered this event.
|
AlertEvent.AlertEventType |
getType()
Returns the type of this AlertEvent
|
boolean |
isPartialClear(String id)
Check if the Alert for the provided id was partially cleared.
|
String |
toString() |
public AlertEvent(String source, Alert alert, RaisedAlertSummary summary, AlertEvent.AlertEventType type)
source - Alert source (typically, subsystem name).alert - Alert instance.summary - Current alert summary for the specified source.type - The type of the alert event.public AlertEvent(String source, String[] clearedIDs, RaisedAlertSummary summary, AlertEvent.AlertEventType type)
source - Alert source (typically, subsystem name).clearedIDs - IDs of cleared alerts.summary - Current alert summary for the specified source.type - The type of the alert event.public String getSource()
getSource in class EventObjectpublic Alert getAlert()
Alert that triggered this event.
Returns null if this event was triggered by cleared alerts or disconnected agent.Alert that triggered this event.public AlertState getLevel()
WARNING or ALARM) at which the alert that triggered this
event was raised. Returns NOMINAL if this event was triggered by clearing alerts.public RaisedAlertSummary getSummary()
null if the source agent has disconnected from the buses.public List<String> getClearedIds()
null if this event was not triggered by clearing alerts.public AlertEvent.AlertEventType getType()
AlertEventType of this alert event.public String toString()
toString in class EventObjectpublic boolean isPartialClear(String id)
id - The Alert id we are checkingpublic AlertState getStateForClearedAlert(String id)
id - The Alert id.Copyright © 2023 LSST. All rights reserved.