Save This Page
Home » openjdk-7 » javax » naming » [javadoc | source]
    1   /*
    2    * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
    3    * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    4    *
    5    * This code is free software; you can redistribute it and/or modify it
    6    * under the terms of the GNU General Public License version 2 only, as
    7    * published by the Free Software Foundation.  Sun designates this
    8    * particular file as subject to the "Classpath" exception as provided
    9    * by Sun in the LICENSE file that accompanied this code.
   10    *
   11    * This code is distributed in the hope that it will be useful, but WITHOUT
   12    * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   13    * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   14    * version 2 for more details (a copy is included in the LICENSE file that
   15    * accompanied this code).
   16    *
   17    * You should have received a copy of the GNU General Public License version
   18    * 2 along with this work; if not, write to the Free Software Foundation,
   19    * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   20    *
   21    * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
   22    * CA 95054 USA or visit www.sun.com if you need additional information or
   23    * have any questions.
   24    */
   25   
   26   package javax.naming;
   27   
   28   /**
   29     * This exception is thrown when
   30     * the particular flavor of authentication requested is not supported.
   31     * For example, if the program
   32     * is attempting to use strong authentication but the directory/naming
   33     * supports only simple authentication, this exception would be thrown.
   34     * Identification of a particular flavor of authentication is
   35     * provider- and server-specific. It may be specified using
   36     * specific authentication schemes such
   37     * those identified using SASL, or a generic authentication specifier
   38     * (such as "simple" and "strong").
   39     *<p>
   40     * If the program wants to handle this exception in particular, it
   41     * should catch AuthenticationNotSupportedException explicitly before
   42     * attempting to catch NamingException. After catching
   43     * <code>AuthenticationNotSupportedException</code>, the program could
   44     * reattempt the authentication using a different authentication flavor
   45     * by updating the resolved context's environment properties accordingly.
   46     * <p>
   47     * Synchronization and serialization issues that apply to NamingException
   48     * apply directly here.
   49     *
   50     * @author Rosanna Lee
   51     * @author Scott Seligman
   52     * @since 1.3
   53     */
   54   
   55   public class AuthenticationNotSupportedException extends NamingSecurityException {
   56       /**
   57        * Constructs a new instance of AuthenticationNotSupportedException using
   58        * an explanation. All other fields default to null.
   59        *
   60        * @param   explanation     A possibly null string containing additional
   61        *                          detail about this exception.
   62        * @see java.lang.Throwable#getMessage
   63        */
   64       public AuthenticationNotSupportedException(String explanation) {
   65           super(explanation);
   66       }
   67   
   68       /**
   69         * Constructs a new instance of AuthenticationNotSupportedException
   70         * all name resolution fields and explanation initialized to null.
   71         */
   72       public AuthenticationNotSupportedException() {
   73           super();
   74       }
   75   
   76       /**
   77        * Use serialVersionUID from JNDI 1.1.1 for interoperability
   78        */
   79       private static final long serialVersionUID = -7149033933259492300L;
   80   }

Save This Page
Home » openjdk-7 » javax » naming » [javadoc | source]