2006-12-12 18:57:24 -05:00
|
|
|
package davmail.imap;
|
|
|
|
|
|
|
|
|
|
|
|
import java.net.Socket;
|
2007-08-02 09:33:45 -04:00
|
|
|
import java.io.IOException;
|
2006-12-12 18:57:24 -05:00
|
|
|
|
|
|
|
import davmail.AbstractServer;
|
2007-05-15 05:37:55 -04:00
|
|
|
import davmail.AbstractConnection;
|
2006-12-12 18:57:24 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Pop3 server
|
|
|
|
*/
|
|
|
|
public class ImapServer extends AbstractServer {
|
2007-05-09 19:37:24 -04:00
|
|
|
public static final int DEFAULT_PORT = 143;
|
2006-12-12 18:57:24 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a ServerSocket to listen for connections.
|
|
|
|
* Start the thread.
|
2009-01-09 17:41:10 -05:00
|
|
|
*
|
|
|
|
* @param port imap listen port, 143 if not defined (0)
|
|
|
|
* @throws java.io.IOException on error
|
2006-12-12 18:57:24 -05:00
|
|
|
*/
|
2007-08-02 09:33:45 -04:00
|
|
|
public ImapServer(int port) throws IOException {
|
2008-11-26 19:56:28 -05:00
|
|
|
super("ImapServer", port, ImapServer.DEFAULT_PORT);
|
2006-12-12 18:57:24 -05:00
|
|
|
}
|
|
|
|
|
2007-05-15 05:37:55 -04:00
|
|
|
public AbstractConnection createConnectionHandler(Socket clientSocket) {
|
|
|
|
return new ImapConnection(clientSocket);
|
2006-12-12 18:57:24 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|