Class EmailNotifier

  • All Implemented Interfaces:
    Notifier

    public class EmailNotifier
    extends Object
    implements Notifier
    Notifier which pushes notifications out via email.
    • Constructor Detail

      • EmailNotifier

        public EmailNotifier()
    • Method Detail

      • initialize

        public void initialize​(NotificationConfig notificationConfig)
        Description copied from interface: Notifier
        Initializes the Notifier to be able to set up connects to begin performing notification operations.
        Specified by:
        initialize in interface Notifier
      • setEmailer

        protected void setEmailer​(Emailer emailer)
        Intended for testing only
      • setAdminEmails

        protected void setAdminEmails​(List<String> adminEmails)
        Intended for testing only
      • getNotificationType

        public NotificationType getNotificationType()
        Description copied from interface: Notifier
        Indicates the type of notifications sent by this notifier
        Specified by:
        getNotificationType in interface Notifier
        Returns:
        the channel type of this notifier
      • notify

        public void notify​(String subject,
                           String message,
                           String... emailAddrs)
        Description copied from interface: Notifier
        Sends a notification to a destination
        Specified by:
        notify in interface Notifier
        Parameters:
        subject - the subject of the notification
        message - the actual notification message
        emailAddrs - where the notification is to go, could be an email address, a URL address, etc.
      • notifyAdmins

        public void notifyAdmins​(String subject,
                                 String message)
        Description copied from interface: Notifier
        Sends a notification to configured admins
        Specified by:
        notifyAdmins in interface Notifier
        Parameters:
        subject - the subject of the notification
        message - the actual notification message