1. /*
  2. * @(#)NotContextException.java 1.4 00/02/02
  3. *
  4. * Copyright 1999, 2000 Sun Microsystems, Inc. All Rights Reserved.
  5. *
  6. * This software is the proprietary information of Sun Microsystems, Inc.
  7. * Use is subject to license terms.
  8. *
  9. */
  10. package javax.naming;
  11. /**
  12. * This exception is thrown when a naming operation proceeds to a point
  13. * where a context is required to continue the operation, but the
  14. * resolved object is not a context. For example, Context.destroy() requires
  15. * that the named object be a context. If it is not, NotContextException
  16. * is thrown. Another example is a non-context being encountered during
  17. * the resolution phase of the Context methods.
  18. *<p>
  19. * It is also thrown when a particular subtype of context is required,
  20. * such as a DirContext, and the resolved object is a context but not of
  21. * the required subtype.
  22. * <p>
  23. * Synchronization and serialization issues that apply to NamingException
  24. * apply directly here.
  25. * @see Context#destroySubcontext
  26. *
  27. * @author Rosanna Lee
  28. * @author Scott Seligman
  29. * @version 1.4 00/02/02
  30. * @since 1.3
  31. */
  32. public class NotContextException extends NamingException {
  33. /**
  34. * Constructs a new instance of NotContextException using an
  35. * explanation. All other fields default to null.
  36. *
  37. * @param explanation Possibly null additional detail about this exception.
  38. * @see java.lang.Throwable#getMessage
  39. */
  40. public NotContextException(String explanation) {
  41. super(explanation);
  42. }
  43. /**
  44. * Constructs a new instance of NotContextException.
  45. * All fields default to null.
  46. */
  47. public NotContextException() {
  48. super();
  49. }
  50. /**
  51. * Use serialVersionUID from JNDI 1.1.1 for interoperability
  52. */
  53. private static final long serialVersionUID = 849752551644540417L;
  54. }