Path: blob/master/src/java.naming/share/classes/javax/naming/AuthenticationNotSupportedException.java
41152 views
/*1* Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package javax.naming;2627/**28* This exception is thrown when29* the particular flavor of authentication requested is not supported.30* For example, if the program31* is attempting to use strong authentication but the directory/naming32* supports only simple authentication, this exception would be thrown.33* Identification of a particular flavor of authentication is34* provider- and server-specific. It may be specified using35* specific authentication schemes such36* those identified using SASL, or a generic authentication specifier37* (such as "simple" and "strong").38*<p>39* If the program wants to handle this exception in particular, it40* should catch AuthenticationNotSupportedException explicitly before41* attempting to catch NamingException. After catching42* <code>AuthenticationNotSupportedException</code>, the program could43* reattempt the authentication using a different authentication flavor44* by updating the resolved context's environment properties accordingly.45* <p>46* Synchronization and serialization issues that apply to NamingException47* apply directly here.48*49* @author Rosanna Lee50* @author Scott Seligman51* @since 1.352*/5354public class AuthenticationNotSupportedException extends NamingSecurityException {55/**56* Constructs a new instance of AuthenticationNotSupportedException using57* an explanation. All other fields default to null.58*59* @param explanation A possibly null string containing additional60* detail about this exception.61* @see java.lang.Throwable#getMessage62*/63public AuthenticationNotSupportedException(String explanation) {64super(explanation);65}6667/**68* Constructs a new instance of AuthenticationNotSupportedException69* with all name resolution fields and explanation initialized to null.70*/71public AuthenticationNotSupportedException() {72super();73}7475/**76* Use serialVersionUID from JNDI 1.1.1 for interoperability77*/78private static final long serialVersionUID = -7149033933259492300L;79}808182