KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > naming > AuthenticationException


1 /*
2  * @(#)AuthenticationException.java 1.7 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package javax.naming;
9
10 /**
11   * This exception is thrown when an authentication error occurs while
12   * accessing the naming or directory service.
13   * An authentication error can happen, for example, when the credentials
14   * supplied by the user program is invalid or otherwise fails to
15   * authenticate the user to the naming/directory service.
16   *<p>
17   * If the program wants to handle this exception in particular, it
18   * should catch AuthenticationException explicitly before attempting to
19   * catch NamingException. After catching AuthenticationException, the
20   * program could reattempt the authentication by updating
21   * the resolved context's environment properties with the appropriate
22   * appropriate credentials.
23   * <p>
24   * Synchronization and serialization issues that apply to NamingException
25   * apply directly here.
26   *
27   * @author Rosanna Lee
28   * @author Scott Seligman
29   * @version 1.7 03/12/19
30   * @since 1.3
31   */

32
33 public class AuthenticationException extends NamingSecurityException JavaDoc {
34     /**
35      * Constructs a new instance of AuthenticationException using the
36      * explanation supplied. All other fields default to null.
37      *
38      * @param explanation A possibly null string containing
39      * additional detail about this exception.
40      * @see java.lang.Throwable#getMessage
41      */

42     public AuthenticationException(String JavaDoc explanation) {
43     super(explanation);
44     }
45
46     /**
47       * Constructs a new instance of AuthenticationException.
48       * All fields are set to null.
49       */

50     public AuthenticationException() {
51     super();
52     }
53
54     /**
55      * Use serialVersionUID from JNDI 1.1.1 for interoperability
56      */

57     private static final long serialVersionUID = 3678497619904568096L;
58 }
59
Popular Tags