org.unitils.mail.impl
Class SmtpServerImpl

java.lang.Object
  extended by org.unitils.mail.impl.SmtpServerImpl
All Implemented Interfaces:
SmtpServer

public class SmtpServerImpl
extends java.lang.Object
implements SmtpServer

Wrapper class for the SimpleSmtpServer of Wiser.

Author:
Jeroen Horemans, Thomas De Rycke, Willemijn Wouters

Constructor Summary
SmtpServerImpl(int port)
           
 
Method Summary
 java.util.List<SmtpMessage> getReceivedEmail()
          It returns all the mails that were received on the fake SMTP server.
 int getReceivedEmailSize()
          This method give you the amount of mails that you've sent to the SMTP server.
 java.lang.Boolean isRunning()
          Returns if the server is running or not.
 void stop()
          This method will stop the SMTP server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmtpServerImpl

public SmtpServerImpl(int port)
Parameters:
port -
Method Detail

getReceivedEmail

public java.util.List<SmtpMessage> getReceivedEmail()
                                             throws java.io.IOException,
                                                    javax.mail.MessagingException
It returns all the mails that were received on the fake SMTP server.

Specified by:
getReceivedEmail in interface SmtpServer
Returns:
List
Throws:
javax.mail.MessagingException
java.io.IOException

getReceivedEmailSize

public int getReceivedEmailSize()
Description copied from interface: SmtpServer
This method give you the amount of mails that you've sent to the SMTP server.

Specified by:
getReceivedEmailSize in interface SmtpServer
Returns:
int

stop

public void stop()
Description copied from interface: SmtpServer
This method will stop the SMTP server.

Specified by:
stop in interface SmtpServer

isRunning

public java.lang.Boolean isRunning()
Description copied from interface: SmtpServer
Returns if the server is running or not.

Specified by:
isRunning in interface SmtpServer
Returns:
Boolean


Copyright © 2013-2014. All Rights Reserved.