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