Interface AlarmNotificationProfile
- All Known Implementing Classes:
AlarmNotificationProfile.DisabledProfile
,AlarmNotificationProfile.NoOpProfile
public interface AlarmNotificationProfile
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
static class
No-op implementation of an AlarmNotificationProfile. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AlarmNotificationProfile
A shared instance of aAlarmNotificationProfile.NoOpProfile
. -
Method Summary
Modifier and TypeMethodDescriptiongetName()
Returns the user-defined name of this profile.ACollection
ofConfigurationProperty
s that will be presented to the user during configuration of a notification block in the alarm pipeline UI.Returns information about the running status of the profile.void
Called when the profile has been removed fromAlarmNotificationManager
.void
Called after instantiation and the profile has been added toAlarmNotificationManager
.void
sendNotification
(NotificationContext notificationContext) Notify a list of Users about an alarm using the notification mechanism provided by this profile.default void
setContextMap
(Map<String, String> contextMap) Allows us to pass along a MDC context map for logging.
-
Field Details
-
NO_OP_PROFILE
A shared instance of aAlarmNotificationProfile.NoOpProfile
.
-
-
Method Details
-
getName
String getName()Returns the user-defined name of this profile.- Returns:
- the user-defined name of this profile.
-
getStatus
ProfileStatus getStatus()Returns information about the running status of the profile.- Returns:
- a
ProfileStatus
that describes the status of this profile.
-
sendNotification
Notify a list of Users about an alarm using the notification mechanism provided by this profile. Implementations must be non-blocking and return quickly, using the notificationContext to call back when the notification work has finished. If some underlying failure in the notification mechanism means no notifications can be sent, useNotificationContext.notificationFailed(com.inductiveautomation.ignition.common.i18n.LocalizedString)
.- Parameters:
notificationContext
- TheNotificationContext
.
-
getProperties
Collection<NotificationProfileProperty<?>> getProperties()ACollection
ofConfigurationProperty
s that will be presented to the user during configuration of a notification block in the alarm pipeline UI. The configured values for these properties will be available in theNotificationContext
for eachsendNotification(NotificationContext)
call to this profile.- Returns:
- A
Collection
ofProperty
s thatsendNotification(NotificationContext)
will expect itsNotificationContext
to have configured.
-
getSupportedContactTypes
Collection<ContactType> getSupportedContactTypes()- Returns:
- a
Collection
ofContactType
s that this profile is capable of sending notification to.
-
onStartup
void onStartup()Called after instantiation and the profile has been added toAlarmNotificationManager
. -
onShutdown
void onShutdown()Called when the profile has been removed fromAlarmNotificationManager
. This could be an update to the profile (remove+add), a removal, or shutdown of the system. -
setContextMap
Allows us to pass along a MDC context map for logging. Default behavior is no-op for backwards compatibility- Parameters:
contextMap
- Map of MDC key-value pairs. Can be null.
-