Interface SmtpMessageHandler.SmtpMessageReader

All Superinterfaces:
AutoCloseable
Enclosing interface:
SmtpMessageHandler

public static interface SmtpMessageHandler.SmtpMessageReader extends AutoCloseable
Represents a simple SmtpMessage iterator.
  • Method Summary

    Modifier and Type
    Method
    Description
    Reads the next available SmtpMessage.

    Methods inherited from interface java.lang.AutoCloseable

    close
  • Method Details

    • readMessage

      SmtpMessage readMessage()
      Reads the next available SmtpMessage. If none, this method will block until a new one is received. If the SmtpServer is closed, this method will return null.
      Returns:
      The next received SmtpMessage or null if the underlying SmtpServer is closed.