Package org.apache.axis.transport.mail
Class MailServer
- java.lang.Object
-
- org.apache.axis.transport.mail.MailServer
-
- All Implemented Interfaces:
java.lang.Runnable
public class MailServer extends java.lang.Object implements java.lang.RunnableThis 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
, Rob Jellinghaus (robj@unrealities.com)
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.commons.logging.Loglog
-
Constructor Summary
Constructors Constructor Description MailServer(java.lang.String host, int port, java.lang.String userid, java.lang.String password)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static AxisServergetAxisServer()booleangetDoThreads()java.lang.StringgetHost()POP3ClientgetPOP3()Obtain the serverSocket that that MailServer is listening on.static voidmain(java.lang.String[] args)Server 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.
-
-
-
Method Detail
-
setDoThreads
public void setDoThreads(boolean value)
-
getDoThreads
public boolean getDoThreads()
-
getHost
public java.lang.String getHost()
-
getAxisServer
protected static AxisServer getAxisServer()
-
run
public void run()
Accept requests from a given TCP port and send them through the Axis engine for processing.- Specified by:
runin interfacejava.lang.Runnable
-
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
public void start(boolean daemon) throws java.lang.ExceptionStart this server. Spawns a worker thread to listen for HTTP requests.- Parameters:
daemon- a boolean indicating if the thread should be a daemon.- Throws:
java.lang.Exception
-
start
public void start() throws java.lang.ExceptionStart this server as a NON-daemon.- Throws:
java.lang.Exception
-
stop
public void stop() throws java.lang.ExceptionStop this server. This will interrupt any pending accept().- Throws:
java.lang.Exception
-
main
public static void main(java.lang.String[] args)
Server process.
-
-