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, org.codehaus.plexus.mailsender.MailSender
public class MockMailSender
- extends org.codehaus.plexus.mailsender.AbstractMailSender
- Version:
- $Id: MockMailSender.java 1313 2004-11-23 15:17:37Z evenisse $
- Author:
- Trygve Laugstøl, Emmanuel Venisse
Fields inherited from class org.codehaus.plexus.mailsender.AbstractMailSender |
DEFAULT_SMTP_PORT |
Fields inherited from interface org.codehaus.plexus.mailsender.MailSender |
ROLE |
Method Summary |
org.codehaus.plexus.mailsender.MailMessage |
getLastReceivedEmail()
Returns the last received email or null if no emails has been sent. |
java.util.Iterator |
getReceivedEmail()
Get email received by this instance since start up. |
org.codehaus.plexus.mailsender.MailMessage |
getReceivedEmail(int index)
Returns the email with the specified index in the list of sent emails. |
int |
getReceivedEmailSize()
Get the number of messages received. |
void |
initialize()
|
void |
send(org.codehaus.plexus.mailsender.MailMessage message)
|
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 java.util.Iterator getReceivedEmail()
- Get email received by this instance since start up.
- Returns:
- Returns a
Iterator
of MailMessage
s.
getLastReceivedEmail
public org.codehaus.plexus.mailsender.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 org.codehaus.plexus.mailsender.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(org.codehaus.plexus.mailsender.MailMessage message)
throws org.codehaus.plexus.mailsender.MailSenderException
- Throws:
org.codehaus.plexus.mailsender.MailSenderException
initialize
public void initialize()
throws java.lang.Exception
- Throws:
java.lang.Exception
Copyright © 2011. All Rights Reserved.