|
|||||||||
| Home >> All >> com >> xpn >> xwiki >> test >> [ smtp overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.xpn.xwiki.test.smtp
Class SimpleSmtpServer

java.lang.Objectcom.xpn.xwiki.test.smtp.SimpleSmtpServer
- All Implemented Interfaces:
- java.lang.Runnable
- public class SimpleSmtpServer
- extends java.lang.Object
- implements java.lang.Runnable
- extends java.lang.Object
Dummy SMTP server for testing purposes.
| Field Summary | |
private boolean |
doStop
Indicates if a stop request has been sent to this server. |
private java.util.List |
receivedMail
Stores all of the email received since this instance started up. |
static int |
SMTP_PORT
SMTP uses port 25. |
private boolean |
stopped
Indicates whether this server is stopped or not. |
| Constructor Summary | |
SimpleSmtpServer()
Constructor. |
|
| Method Summary | |
int |
getReceievedEmailSize()
Get the number of messages received. |
java.util.Iterator |
getReceivedEmail()
Get email received by this instance since start up. |
boolean |
isStopped()
Indicates whether this server is stopped or not. |
void |
run()
Main loop of the SMTP server. |
private void |
sendResponse(java.io.PrintWriter out,
SmtpResponse smtpResponse)
Send response to client. |
static SimpleSmtpServer |
start()
Creates an instance of SimpleSmtpServer and starts it. |
void |
stop()
Forces the server to stop after processing the current request. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
receivedMail
private java.util.List receivedMail
- Stores all of the email received since this instance started up.
SMTP_PORT
public static final int SMTP_PORT
- SMTP uses port 25.
- See Also:
- Constant Field Values
stopped
private volatile boolean stopped
- Indicates whether this server is stopped or not.
doStop
private volatile boolean doStop
- Indicates if a stop request has been sent to this server.
| Constructor Detail |
SimpleSmtpServer
public SimpleSmtpServer()
- Constructor.
| Method Detail |
run
public void run()
- Main loop of the SMTP server.
- Specified by:
runin interfacejava.lang.Runnable
sendResponse
private void sendResponse(java.io.PrintWriter out, SmtpResponse smtpResponse)
- Send response to client.
getReceivedEmail
public java.util.Iterator getReceivedEmail()
- Get email received by this instance since start up.
getReceievedEmailSize
public int getReceievedEmailSize()
- Get the number of messages received.
stop
public void stop()
- Forces the server to stop after processing the current request.
isStopped
public boolean isStopped()
- Indicates whether this server is stopped or not.
start
public static SimpleSmtpServer start()
- Creates an instance of SimpleSmtpServer and starts it.
|
|||||||||
| Home >> All >> com >> xpn >> xwiki >> test >> [ smtp overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.xpn.xwiki.test.smtp.SimpleSmtpServer