Interface NotificationService
- All Superinterfaces:
ConfigurableComponent
- All Known Implementing Classes:
AbstractNotificationService,EmailNotificationService,HttpNotificationService
A NotificationService is simple mechanism that the Bootstrap can use to notify interested parties when some event takes place, such as NiFi being started, stopped, or restarted because the process died.
Note: This feature was introduced in version 0.3.0 of NiFi and is likely to undergo significant refactorings. As such, at this time it is NOT considered a public API and may well change from version to version until the API has stabilized. At that point, it will become a public API.
- Since:
- 0.3.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidProvides the NotificationService with access to objects that may be of use throughout the life of the servicevoidnotify(NotificationContext context, NotificationType notificationType, String subject, String message) Notifies the configured recipients of some eventMethods inherited from interface org.apache.nifi.components.ConfigurableComponent
getIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate
-
Method Details
-
initialize
Provides the NotificationService with access to objects that may be of use throughout the life of the service- Parameters:
context- of initialization
-
notify
void notify(NotificationContext context, NotificationType notificationType, String subject, String message) throws NotificationFailedException Notifies the configured recipients of some event- Parameters:
context- the context that is relevant for this notificationnotificationType- the notification typesubject- the subject of the messagemessage- the message to be provided to recipients- Throws:
NotificationFailedException
-