Package org.apache.axis.transport.mail
Class MailServer
java.lang.Object
org.apache.axis.transport.mail.MailServer
- All Implemented Interfaces:
Runnable
This is a simple implementation of an SMTP/POP3 server for processing
SOAP requests via Apache's xml-axis. This is not intended for production
use. Its intended uses are for demos, debugging, and performance
profiling.
- Author:
- Davanum Srinivas <dims@yahoo.com>, Rob Jellinghaus (robj@unrealities.com)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static AxisServerbooleangetHost()POP3ClientgetPOP3()Obtain the serverSocket that that MailServer is listening on.static voidServer process.voidrun()Accept requests from a given TCP port and send them through the Axis engine for processing.voidsetDoThreads(boolean value) voidsetPOP3(POP3Client pop3) Set the serverSocket this server should listen on.voidstart()Start this server as a NON-daemon.voidstart(boolean daemon) Start this server.voidstop()Stop this server.
-
Field Details
-
log
protected static org.apache.commons.logging.Log log
-
-
Constructor Details
-
MailServer
-
-
Method Details
-
setDoThreads
public void setDoThreads(boolean value) -
getDoThreads
public boolean getDoThreads() -
getHost
-
getAxisServer
-
run
public void run()Accept requests from a given TCP port and send them through the Axis engine for processing. -
getPOP3
public POP3Client getPOP3()Obtain the serverSocket that that MailServer is listening on. -
setPOP3
public void setPOP3(POP3Client pop3) Set the serverSocket this server should listen on. (note : changing this will not affect a running server, but if you stop() and then start() the server, the new socket will be used). -
start
Start this server. Spawns a worker thread to listen for HTTP requests.- Parameters:
daemon- a boolean indicating if the thread should be a daemon.- Throws:
Exception
-
start
Start this server as a NON-daemon.- Throws:
Exception
-
stop
Stop this server. This will interrupt any pending accept().- Throws:
Exception
-
main
Server process.
-