|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dumbster.smtp.SimpleSmtpServer
public class SimpleSmtpServer
Dummy SMTP server for testing purposes.
Field Summary | |
---|---|
static int |
DEFAULT_SMTP_PORT
Default SMTP port is 25. |
Constructor Summary | |
---|---|
SimpleSmtpServer(int port)
Constructor. |
Method Summary | |
---|---|
java.util.Iterator |
getReceivedEmail()
Get email received by this instance since start up. |
int |
getReceivedEmailSize()
Get the number of messages received. |
boolean |
isStopped()
Check if the server has been placed in a stopped state. |
void |
run()
Main loop of the SMTP server. |
static SimpleSmtpServer |
start()
Creates an instance of SimpleSmtpServer and starts it. |
static SimpleSmtpServer |
start(int port)
Creates an instance of SimpleSmtpServer and starts it. |
void |
stop()
Stops the server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_SMTP_PORT
Constructor Detail |
---|
public SimpleSmtpServer(int port)
port
- port numberMethod Detail |
---|
public void run()
run
in interface java.lang.Runnable
public boolean isStopped()
public void stop()
public java.util.Iterator getReceivedEmail()
public int getReceivedEmailSize()
public static SimpleSmtpServer start()
public static SimpleSmtpServer start(int port)
port
- port number the server should listen to
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |