1. /*
  2. * @(#)AuthenticationNotSupportedException.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. package javax.naming;
  8. /**
  9. * This exception is thrown when
  10. * the particular flavor of authentication requested is not supported.
  11. * For example, if the program
  12. * is attempting to use strong authentication but the directory/naming
  13. * supports only simple authentication, this exception would be thrown.
  14. * Identification of a particular flavor of authentication is
  15. * provider- and server-specific. It may be specified using
  16. * specific authentication schemes such
  17. * those identified using SASL, or a generic authentication specifier
  18. * (such as "simple" and "strong").
  19. *<p>
  20. * If the program wants to handle this exception in particular, it
  21. * should catch AuthenticationNotSupportedException explicitly before
  22. * attempting to catch NamingException. After catching
  23. * <code>AuthenticationNotSupportedException</code>, the program could
  24. * reattempt the authentication using a different authentication flavor
  25. * by updating the resolved context's environment properties accordingly.
  26. * <p>
  27. * Synchronization and serialization issues that apply to NamingException
  28. * apply directly here.
  29. *
  30. * @author Rosanna Lee
  31. * @author Scott Seligman
  32. * @version 1.7 03/12/19
  33. * @since 1.3
  34. */
  35. public class AuthenticationNotSupportedException extends NamingSecurityException {
  36. /**
  37. * Constructs a new instance of AuthenticationNotSupportedException using
  38. * an explanation. All other fields default to null.
  39. *
  40. * @param explanation A possibly null string containing additional
  41. * detail about this exception.
  42. * @see java.lang.Throwable#getMessage
  43. */
  44. public AuthenticationNotSupportedException(String explanation) {
  45. super(explanation);
  46. }
  47. /**
  48. * Constructs a new instance of AuthenticationNotSupportedException
  49. * all name resolution fields and explanation initialized to null.
  50. */
  51. public AuthenticationNotSupportedException() {
  52. super();
  53. }
  54. /**
  55. * Use serialVersionUID from JNDI 1.1.1 for interoperability
  56. */
  57. private static final long serialVersionUID = -7149033933259492300L;
  58. }