public interface NotificationDispatcher
NotificationDispatcher interface represents a mechanism for dispatching a
Notification.
Dispatchers should, in general, be singletons. They should also invoke the
appropriate methods on Notification.Callback to indicate a success or
failure during dispatch.| Modifier and Type | Method and Description |
|---|---|
void |
dispatch(Notification notification)
Dispatches the specified notification.
|
String |
getType()
Gets the type of dispatcher.
|
boolean |
isDigestSupported()
Gets whether the dispatcher supports sending a digest or summary in a
single
Notification. |
boolean |
isNotificationContentGenerationRequired()
Gets whether Ambari should attempt to generate the content of the
Notification before giving it to the dispatcher. |
TargetConfigurationResult |
validateTargetConfig(Map<String,Object> properties)
Validates alert target configuration.
|
String getType()
null).void dispatch(Notification notification)
notification - the notificationt to dispatch (not null).boolean isDigestSupported()
Notification. Some providers may not allow the
Notification to contain information on more than a single event.true if digest is supported, false otherwise.TargetConfigurationResult validateTargetConfig(Map<String,Object> properties)
properties - alert target propertiesboolean isNotificationContentGenerationRequired()
Notification before giving it to the dispatcher. Some dispatchers
may choose to format data in a way which is not easily represented in the
{alert-templates.xml}.
If false then the Notification will only contain the
recipients and a map of properties for the dispatcher to use.true if Ambari should generate the Notification
content, false otherwise.Copyright © 2022 Apache Software Foundation. All rights reserved.