类 TestMailErrorHandler
- java.lang.Object
- org.springframework.batch.sample.domain.mail.internal.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
构造器概要
构造器 构造器 说明 TestMailErrorHandler()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
clear()
java.util.List<org.springframework.mail.MailMessage>
getFailedMessages()
void
handle(org.springframework.mail.MailMessage failedMessage, java.lang.Exception ex)
This method will be called for each message that failed sending in the chunk.
构造器详细资料
TestMailErrorHandler
public TestMailErrorHandler()
方法详细资料
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 messageex
- the exception that caused the failure
getFailedMessages
public java.util.List<org.springframework.mail.MailMessage> getFailedMessages()
clear
public void clear()