Class MailReceiver

    • Method Detail

      • requestDeletion

        public void requestDeletion​(String messageId)
        requestDeletion will enqueue an email for deletion and delete it the next time we connect to the email server. This does not guarantee deletion as the Gerrit instance might fail before we connect to the email server.
      • handleEmails

        public abstract void handleEmails​(boolean async)
                                   throws MailTransferException,
                                          IOException
        handleEmails will open a connection to the mail server, remove emails where deletion is pending, read new email and close the connection.
        Parameters:
        async - determines if processing messages should happen asynchronously
        Throws:
        MailTransferException - in case of a known transport failure
        IOException - in case of a low-level transport failure
      • dispatchMailProcessor

        protected void dispatchMailProcessor​(List<com.google.gerrit.mail.MailMessage> messages,
                                             boolean async)