01: /*
02: * This file is part of the QuickServer library
03: * Copyright (C) 2003-2005 QuickServer.org
04: *
05: * Use, modification, copying and distribution of this software is subject to
06: * the terms and conditions of the GNU Lesser General Public License.
07: * You should have received a copy of the GNU LGP License along with this
08: * library; if not, you can download a copy from <http://www.quickserver.org/>.
09: *
10: * For questions, suggestions, bug-reports, enhancement-requests etc.
11: * visit http://www.quickserver.org
12: *
13: */
14:
15: package org.quickserver.net.server;
16:
17: import java.io.*;
18: import java.net.SocketTimeoutException;
19: import org.quickserver.net.AppException;
20:
21: /**
22: * This interface defines a class that can be used by
23: * QuickServer to authenticate a client when new connection is
24: * made to QuickServer. Should have a default constructor.
25: * @author Akshathkumar Shetty
26: * @deprecated As of 1.4.6 use {@link ClientAuthenticationHandler}
27: */
28: public interface Authenticator {
29:
30: /**
31: * This method is called by {@link QuickServer}
32: * if Authenticator was set, to authenticate any client
33: * connection.
34: * @return result of authentication.
35: * @exception org.quickserver.net.AppException
36: * if ServerAuthenticator wants QuickServer to close the
37: * client connection. <br>
38: * Can be used for exiting on Timeouts<br>
39: * Can be used when Quit commands is received when
40: * Authenticating.
41: * @exception java.io.IOException if there is socket error
42: */
43: public boolean askAuthorisation(ClientHandler clientHandler)
44: throws IOException, AppException;
45: }
|