CannotProceedException.java revision 2362
2362N/A * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * This exception is thrown to indicate that the operation reached 0N/A * a point in the name where the operation cannot proceed any further. 0N/A * When performing an operation on a composite name, a naming service 0N/A * provider may reach a part of the name that does not belong to its 0N/A * namespace. At that point, it can construct a 0N/A * CannotProceedException and then invoke methods provided by 0N/A * javax.naming.spi.NamingManager (such as getContinuationContext()) 0N/A * to locate another provider to continue the operation. If this is 0N/A * not possible, this exception is raised to the caller of the 0N/A * context operation. 0N/A * If the program wants to handle this exception in particular, it 0N/A * should catch CannotProceedException explicitly before attempting to 0N/A * catch NamingException. 0N/A * A CannotProceedException instance is not synchronized against concurrent 0N/A * multithreaded access. Multiple threads trying to access and modify 0N/A * CannotProceedException should lock the object. 0N/A * @author Rosanna Lee 0N/A * @author Scott Seligman 0N/A * The serialized form of a CannotProceedException object consists of 0N/A * the serialized fields of its NamingException superclass, the remaining new 0N/A * name (a Name object), the environment (a Hashtable), the altName field 0N/A * (a Name object), and the serialized form of the altNameCtx field. 0N/A * Contains the remaining unresolved part of the second 0N/A * "name" argument to Context.rename(). 0N/A * This information necessary for 0N/A * continuing the Context.rename() operation. 0N/A * This field is initialized to null. 0N/A * It should not be manipulated directly: it should 0N/A * be accessed and updated using getRemainingName() and setRemainingName(). 0N/A * @see #getRemainingNewName 0N/A * @see #setRemainingNewName 0N/A * Contains the environment 0N/A * relevant for the Context or DirContext method that cannot proceed. 0N/A * This field is initialized to null. 0N/A * It should not be manipulated directly: it should be accessed 0N/A * and updated using getEnvironment() and setEnvironment(). 0N/A * @see #getEnvironment 0N/A * @see #setEnvironment 0N/A * Contains the name of the resolved object, relative 0N/A * to the context <code>altNameCtx</code>. It is a composite name. 0N/A * If null, then no name is specified. 0N/A * See the <code>javax.naming.spi.ObjectFactory.getObjectInstance</code> 0N/A * method for details on how this is used. 0N/A * This field is initialized to null. 0N/A * It should not be manipulated directly: it should 0N/A * be accessed and updated using getAltName() and setAltName(). 0N/A * @see javax.naming.spi.ObjectFactory#getObjectInstance 0N/A * Contains the context relative to which 0N/A * <code>altName</code> is specified. If null, then the default initial 0N/A * context is implied. 0N/A * See the <code>javax.naming.spi.ObjectFactory.getObjectInstance</code> 0N/A * method for details on how this is used. 0N/A * This field is initialized to null. 0N/A * It should not be manipulated directly: it should 0N/A * be accessed and updated using getAltNameCtx() and setAltNameCtx(). 0N/A * @see #getAltNameCtx 0N/A * @see #setAltNameCtx 0N/A * @see javax.naming.spi.ObjectFactory#getObjectInstance 0N/A * Constructs a new instance of CannotProceedException using an 0N/A * explanation. All unspecified fields default to null. 0N/A * @param explanation A possibly null string containing additional 0N/A * detail about this exception. 0N/A * If null, this exception has no detail message. 0N/A * @see java.lang.Throwable#getMessage 0N/A * Constructs a new instance of CannotProceedException. 0N/A * All fields default to null. 0N/A * Retrieves the environment that was in effect when this exception 0N/A * @return Possibly null environment property set. 0N/A * null means no environment was recorded for this exception. 0N/A * @see #setEnvironment 0N/A * Sets the environment that will be returned when getEnvironment() 0N/A * @param environment A possibly null environment property set. 0N/A * null means no environment is being recorded for 0N/A * @see #getEnvironment 0N/A * Retrieves the "remaining new name" field of this exception, which is 0N/A * used when this exception is thrown during a rename() operation. 0N/A * @return The possibly null part of the new name that has not been resolved. 0N/A * It is a composite name. It can be null, which means 0N/A * the remaining new name field has not been set. 0N/A * @see #setRemainingNewName 0N/A * Sets the "remaining new name" field of this exception. 0N/A * This is the value returned by <code>getRemainingNewName()</code>. 0N/A * <tt>newName</tt> is a composite name. If the intent is to set 0N/A * this field using a compound name or string, you must 0N/A * "stringify" the compound name, and create a composite 0N/A * name with a single component using the string. You can then 0N/A * invoke this method using the resulting composite name. 0N/A * A copy of <code>newName</code> is made and stored. 0N/A * Subsequent changes to <code>name</code> does not 0N/A * affect the copy in this NamingException and vice versa. 0N/A * @param newName The possibly null name to set the "remaining new name" to. 0N/A * If null, it sets the remaining name field to null. 0N/A * @see #getRemainingNewName 0N/A * Retrieves the <code>altName</code> field of this exception. 0N/A * This is the name of the resolved object, relative to the context 0N/A * <code>altNameCtx</code>. It will be used during a subsequent call to the 0N/A * <code>javax.naming.spi.ObjectFactory.getObjectInstance</code> method. 0N/A * @return The name of the resolved object, relative to 0N/A * <code>altNameCtx</code>. 0N/A * It is a composite name. If null, then no name is specified. 0N/A * @see #getAltNameCtx 0N/A * @see javax.naming.spi.ObjectFactory#getObjectInstance 0N/A * Sets the <code>altName</code> field of this exception. 0N/A * @param altName The name of the resolved object, relative to 0N/A * <code>altNameCtx</code>. 0N/A * It is a composite name. 0N/A * If null, then no name is specified. 0N/A * @see #setAltNameCtx 0N/A * Retrieves the <code>altNameCtx</code> field of this exception. 0N/A * This is the context relative to which <code>altName</code> is named. 0N/A * It will be used during a subsequent call to the 0N/A * <code>javax.naming.spi.ObjectFactory.getObjectInstance</code> method. 0N/A * @return The context relative to which <code>altName</code> is named. 0N/A * If null, then the default initial context is implied. 0N/A * @see #setAltNameCtx 0N/A * @see javax.naming.spi.ObjectFactory#getObjectInstance 0N/A * Sets the <code>altNameCtx</code> field of this exception. 0N/A * The context relative to which <code>altName</code> 0N/A * is named. If null, then the default initial context 0N/A * @see #getAltNameCtx 0N/A * Use serialVersionUID from JNDI 1.1.1 for interoperability