Interface AlarmNotificationProfile
-
- All Known Implementing Classes:
AlarmNotificationProfile.DisabledProfile
,AlarmNotificationProfile.NoOpProfile
public interface AlarmNotificationProfile
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
AlarmNotificationProfile.DisabledProfile
static class
AlarmNotificationProfile.NoOpProfile
No-op implementation of an AlarmNotificationProfile.
-
Field Summary
Fields Modifier and Type Field Description static AlarmNotificationProfile
NO_OP_PROFILE
A shared instance of aAlarmNotificationProfile.NoOpProfile
.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.String
getName()
Returns the user-defined name of this profile.java.util.Collection<NotificationProfileProperty<?>>
getProperties()
ACollection
ofConfigurationProperty
s that will be presented to the user during configuration of a notification block in the alarm pipeline UI.ProfileStatus
getStatus()
Returns information about the running status of the profile.java.util.Collection<ContactType>
getSupportedContactTypes()
void
onShutdown()
Called when the profile has been removed fromAlarmNotificationManager
.void
onStartup()
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(java.util.Map<java.lang.String,java.lang.String> contextMap)
Allows us to pass along a MDC context map for logging.
-
-
-
Field Detail
-
NO_OP_PROFILE
static final AlarmNotificationProfile NO_OP_PROFILE
A shared instance of aAlarmNotificationProfile.NoOpProfile
.
-
-
Method Detail
-
getName
java.lang.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
void sendNotification(NotificationContext notificationContext)
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
java.util.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
java.util.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
default void setContextMap(java.util.Map<java.lang.String,java.lang.String> contextMap)
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.
-
-