public interface NotificationService extends ConfigurableComponent
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.
Modifier and Type | Method and Description |
---|---|
void |
initialize(NotificationInitializationContext context)
Provides the NotificationService with access to objects that may be of use
throughout the life of the service
|
void |
notify(NotificationContext context,
NotificationType notificationType,
java.lang.String subject,
java.lang.String message)
Notifies the configured recipients of some event
|
getIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate
void initialize(NotificationInitializationContext context)
context
- of initializationvoid notify(NotificationContext context, NotificationType notificationType, java.lang.String subject, java.lang.String message) throws NotificationFailedException
context
- the context that is relevant for this notificationnotificationType
- the notification typesubject
- the subject of the messagemessage
- the message to be provided to recipientsNotificationFailedException