2008-12-03 06:38:35 -05:00
|
|
|
package davmail.ldap;
|
|
|
|
|
|
|
|
import davmail.AbstractConnection;
|
|
|
|
import davmail.AbstractServer;
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.net.Socket;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* LDAP server, handle LDAP directory requests.
|
|
|
|
*/
|
|
|
|
public class LdapServer extends AbstractServer {
|
|
|
|
public static final int DEFAULT_PORT = 389;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a ServerSocket to listen for connections.
|
|
|
|
* Start the thread.
|
|
|
|
*
|
|
|
|
* @param port pop listen port, 389 if not defined (0)
|
2009-04-16 18:20:30 -04:00
|
|
|
* @throws IOException on error
|
2008-12-03 06:38:35 -05:00
|
|
|
*/
|
|
|
|
public LdapServer(int port) throws IOException {
|
|
|
|
super("LdapServer", port, LdapServer.DEFAULT_PORT);
|
|
|
|
}
|
|
|
|
|
2009-04-16 17:52:17 -04:00
|
|
|
@Override
|
2008-12-03 06:38:35 -05:00
|
|
|
public AbstractConnection createConnectionHandler(Socket clientSocket) {
|
2008-12-26 08:21:39 -05:00
|
|
|
return new LdapConnection(clientSocket);
|
2008-12-03 06:38:35 -05:00
|
|
|
}
|
|
|
|
}
|