org.springframework.batch.item.mail
Interface MailErrorHandler

All Known Implementing Classes:
DefaultMailErrorHandler

public interface MailErrorHandler

This class is used to handle errors that occur when email messages are unable to be sent.

Since:
2.1
Author:
Dan Garrette, Dave Syer

Method Summary
 void handle(MailMessage message, Exception exception)
          This method will be called for each message that failed sending in the chunk.
 

Method Detail

handle

void handle(MailMessage message,
            Exception exception)
            throws MailException
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.

Parameters:
message - the failed message
exception - the exception that caused the failure
Throws:
MailException - if the exception cannot be handled


Copyright © 2013 SpringSource. All Rights Reserved.