类 TestMailErrorHandler

  • 所有已实现的接口:
    MailErrorHandler

    public class TestMailErrorHandler
    extends java.lang.Object
    implements MailErrorHandler
    This handler prints out failed messages with their exceptions. It also maintains a list of all failed messages it receives for lookup later by an assertion.
    从以下版本开始:
    2.1
    作者:
    Dan Garrette, Dave Syer
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型方法说明
      voidclear() 
      java.util.List<org.springframework.mail.MailMessage>getFailedMessages() 
      voidhandle​(org.springframework.mail.MailMessage failedMessage, java.lang.Exception ex)
      This method will be called for each message that failed sending in the chunk.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 方法详细资料

      • handle

        public void handle​(org.springframework.mail.MailMessage failedMessage,
                           java.lang.Exception ex)
        从接口复制的说明: MailErrorHandler
        This method will be called for each message that failed sending in the chunk. If the failed message is needed by the handler it will need to be downcast according to its runtime type. If an exception is thrown from this method, then it will propagate to the caller.
        指定者:
        handle 在接口中 MailErrorHandler
        参数:
        failedMessage - the failed message
        ex - the exception that caused the failure
      • getFailedMessages

        public java.util.List<org.springframework.mail.MailMessage> getFailedMessages()
      • clear

        public void clear()