KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > naming > NotContextException


1 /*
2  * @(#)NotContextException.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 a naming operation proceeds to a point
12   * where a context is required to continue the operation, but the
13   * resolved object is not a context. For example, Context.destroy() requires
14   * that the named object be a context. If it is not, NotContextException
15   * is thrown. Another example is a non-context being encountered during
16   * the resolution phase of the Context methods.
17   *<p>
18   * It is also thrown when a particular subtype of context is required,
19   * such as a DirContext, and the resolved object is a context but not of
20   * the required subtype.
21   * <p>
22   * Synchronization and serialization issues that apply to NamingException
23   * apply directly here.
24   * @see Context#destroySubcontext
25   *
26   * @author Rosanna Lee
27   * @author Scott Seligman
28   * @version 1.7 03/12/19
29   * @since 1.3
30   */

31
32 public class NotContextException extends NamingException JavaDoc {
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 JavaDoc explanation) {
41     super(explanation);
42     }
43
44     /**
45       * Constructs a new instance of NotContextException.
46       * All fields default to null.
47       */

48     public NotContextException() {
49     super();
50     }
51
52     /**
53      * Use serialVersionUID from JNDI 1.1.1 for interoperability
54      */

55     private static final long serialVersionUID = 849752551644540417L;
56 }
57
Popular Tags