1 /* 2 * This file is part of the QuickServer library 3 * Copyright (C) 2003-2005 QuickServer.org 4 * 5 * Use, modification, copying and distribution of this software is subject to 6 * the terms and conditions of the GNU Lesser General Public License. 7 * You should have received a copy of the GNU LGP License along with this 8 * library; if not, you can download a copy from <http://www.quickserver.org/>. 9 * 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 /** 23 * This interface defines a class that can be used by 24 * QuickServer to authenticate a client when new connection is 25 * made to QuickServer. Should have a default constructor. 26 * @author Akshathkumar Shetty 27 * @deprecated As of 1.4.6 use {@link ClientAuthenticationHandler} 28 */ 29 public interface Authenticator { 30 31 /** 32 * This method is called by {@link QuickServer} 33 * if Authenticator was set, to authenticate any client 34 * connection. 35 * @return result of authentication. 36 * @exception org.quickserver.net.AppException 37 * if ServerAuthenticator wants QuickServer to close the 38 * client connection. <br> 39 * Can be used for exiting on Timeouts<br> 40 * Can be used when Quit commands is received when 41 * Authenticating. 42 * @exception java.io.IOException if there is socket error 43 */ 44 public boolean askAuthorisation(ClientHandler clientHandler) 45 throws IOException, AppException; 46 } 47