Class AbstractEmailWriter

    • Constructor Detail

      • AbstractEmailWriter

        public AbstractEmailWriter()
    • Method Detail

      • check

        protected String check​(Email email)
        Hook method for performing checks before writing the emails.

        Default implementation checks only whether an email has been provided.
        Returns:
        the error message, null if everything OK
      • doWrite

        protected abstract String doWrite​(Email email)
        Performs the actual writing.
        Parameters:
        email - the email to write
        Returns:
        the error message, null if everything OK
      • write

        public String write​(Email email)
        Writes the email.
        Specified by:
        write in interface EmailWriter
        Parameters:
        email - the email to write
        Returns:
        the error message, null if everything OK