Class TextEmailTransport

  • All Implemented Interfaces:
    NotificationTransport

    @ThreadSafe
    public class TextEmailTransport
    extends Object
    Knows how to send text emails to the given email address.
    • Constructor Detail

    • Method Detail

      • sendNotification

        public void sendNotification​(@NotNull
                                     @NotNull Notification notification)
        Description copied from interface: NotificationTransport
        Send off the notification of this transport type.
        Parameters:
        notification - object (used to generate notification content)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • compareTo

        public int compareTo​(Object obj)
      • beginEmail

        protected com.atlassian.mail.Email beginEmail​(@NotNull
                                                      @NotNull Notification notification)
                                               throws Exception
        Creates a new Email object with information that is common to all e-mail notifications.
        Parameters:
        notification - the notification to be sent to the transport
        Returns:
        the newly initialized e-mail data
        Throws:
        Exception - if Notification.getEmailSubject() does
      • updateEmail

        protected com.atlassian.mail.Email updateEmail​(@NotNull
                                                       @NotNull com.atlassian.mail.Email email,
                                                       @NotNull
                                                       @NotNull Notification notification)
        Applies notification-specific customizations to the e-mail as provided for in the ExtendedNotification interface.
        Parameters:
        email - the e-mail to be altered
        notification - the notification to be sent to the transport
        Returns:
        email, possibly with modifications
      • send

        protected void send​(com.atlassian.mail.Email email)
        Publishes the e-mail event to the publishing service
        Parameters:
        email - the completed e-mail to be sent
      • getEmailAddress

        public String getEmailAddress()