Package com.aoindustries.noc.monitor
Class AlertLevelAndMessage
- java.lang.Object
-
- com.aoindustries.noc.monitor.AlertLevelAndMessage
-
public class AlertLevelAndMessage extends Object
Stores two return values.- Author:
- AO Industries, Inc.
-
-
Field Summary
Fields Modifier and Type Field Description static AlertLevelAndMessage
NONE
An alert level and message with no alert and no message.
-
Constructor Summary
Constructors Constructor Description AlertLevelAndMessage(AlertLevel alertLevel, Function<Locale,String> alertMessage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AlertLevelAndMessage
escalate(AlertLevel newAlertLevel, Function<Locale,String> newAlertMessage)
Gets a new alert level and message if a higher alert level, otherwise returns this alert level and message.AlertLevel
getAlertLevel()
Function<Locale,String>
getAlertMessage()
Gets the alert message ornull
for none.
-
-
-
Field Detail
-
NONE
public static final AlertLevelAndMessage NONE
An alert level and message with no alert and no message.
-
-
Constructor Detail
-
AlertLevelAndMessage
public AlertLevelAndMessage(AlertLevel alertLevel, Function<Locale,String> alertMessage)
-
-
Method Detail
-
getAlertLevel
public AlertLevel getAlertLevel()
-
getAlertMessage
public Function<Locale,String> getAlertMessage()
Gets the alert message ornull
for none.
-
escalate
public AlertLevelAndMessage escalate(AlertLevel newAlertLevel, Function<Locale,String> newAlertMessage)
Gets a new alert level and message if a higher alert level, otherwise returns this alert level and message.
-
-