org.codehaus.plexus.mailsender.test
Class MockMailSender
java.lang.Object
org.codehaus.plexus.logging.AbstractLogEnabled
org.codehaus.plexus.mailsender.AbstractMailSender
org.codehaus.plexus.mailsender.test.MockMailSender
- All Implemented Interfaces:
- org.codehaus.plexus.logging.LogEnabled, MailSender
public class MockMailSender
- extends AbstractMailSender
- Version:
- $Id: MockMailSender.java 1313 2004-11-23 15:17:37Z evenisse $
- Author:
- Trygve Laugstøl, Emmanuel Venisse
Fields inherited from interface org.codehaus.plexus.mailsender.MailSender |
ROLE |
Methods inherited from class org.codehaus.plexus.mailsender.AbstractMailSender |
getPassword, getSmtpHost, getSmtpPort, getUsername, isSslMode, send, send, setPassword, setSmtpHost, setSmtpPort, setSslMode, setUsername, verify |
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MockMailSender
public MockMailSender()
getReceivedEmail
public Iterator getReceivedEmail()
- Get email received by this instance since start up.
- Returns:
- Returns a
Iterator
of MailMessage
s.
getLastReceivedEmail
public MailMessage getLastReceivedEmail()
- Returns the last received email or
null
if no emails has been sent.
- Returns:
- Returns the last received email or
null
if no emails has been sent.
getReceivedEmail
public MailMessage getReceivedEmail(int index)
- Returns the email with the specified index in the list of sent emails.
- Parameters:
index
- The index.
- Returns:
- Returns the email with the specified index in the list of sent emails.
getReceivedEmailSize
public int getReceivedEmailSize()
- Get the number of messages received.
- Returns:
- Returns the number of received mails.
send
public void send(MailMessage message)
throws MailSenderException
- Description copied from interface:
MailSender
- Send a mail.
- Throws:
MailSenderException
initialize
public void initialize()
throws Exception
- Throws:
Exception
Copyright © 2011. All Rights Reserved.