/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can
* obtain a copy of the License at
* or packager/legal/LICENSE.txt. See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at packager/legal/LICENSE.txt.
*
* GPL Classpath Exception:
* Oracle designates this particular file as subject to the "Classpath"
* exception as provided by Oracle in the GPL Version 2 section of the License
* file that accompanied this code.
*
* Modifications:
* If applicable, add the following below the License Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyright [year] [name of copyright owner]"
*
* Contributor(s):
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/
/**
* Class to implement multiple level of subcontexts in SerialContext. To use this
* class a new object of class InitialContext (env) should be instantiated.
* The env i.e the Environment is initialised with SerialInitContextFactory
* An example for using this is in /test/subcontext
*/
public static final boolean debug = false;
// Issue 7067: lots of lookup failures in a heavily concurrent client.
// and only imposes a global lock on relatively infrequent updates.
public TransientContext() {
}
/**
* Create a subcontext with the specified name.
*
* @return the created subcontext.
* @throws NamingException if there is a naming exception.
*/
return drillDownAndCreateSubcontext(name);
}
/**
* Create a subcontext with the specified name.
*
* @return the created subcontext.
* @throws NamingException if there is a naming exception.
*/
}
/**
* Destroy the subcontext with the specified name.
*
* @throws NamingException if there is a naming exception.
*/
}
/**
* Destroy the subcontext with the specified name.
*
* @throws NamingException if there is a naming exception.
*/
}
/**
* Handles making nested subcontexts
* (if not present already - it will create it) and then
* make subcontext hij
*
* @return the created subcontext.
* @throws NamingException if there is a Naming exception
*/
throws NamingException {
try {
throw new NameAlreadyBoundException("Subcontext " +
name + "already present");
}
ctx = new TransientContext();
return ctx;
} else {
try {
} catch (NameNotFoundException e) {
ctx = new TransientContext();
}
return retCtx;
}
} finally {
}
}
/**
* Handles deleting nested subcontexts
* it will delete it) and then delete subcontext hij
*
* @throws NamingException if there is a naming exception
*/
throws NamingException {
try {
if (n.size() < 1) {
throw new InvalidNameException("Cannot destoy empty subcontext");
}
} else {
" not found");
}
} else {
}
} finally {
}
}
/**
* Lookup the specified name.
*
* @return the object or context bound to the name.
* @throws NamingException if there is a naming exception.
* @throws java.rmi.RemoteException if there is an RMI exception.
*/
try {
if (n.size() < 1) {
throw new InvalidNameException("Cannot bind empty name");
}
} else {
}
} finally {
}
}
/**
* Lookup the specified name.
*
* @return the object or context bound to the name.
* @throws NamingException if there is a naming exception.
* @throws java.rmi.RemoteException if there is an RMI exception.
*/
}
/**
* Lookup the specified name in the current objects hashtable.
*
* @return the object or context bound to the name.
* @throws NamingException if there is a naming exception.
* @throws java.rmi.RemoteException if there is an RMI exception.
*/
}
return answer;
}
/**
* Bind the object to the specified name.
*
* @throws NamingException if there is a naming exception.
* @throws java.rmi.RemoteException if there is an RMI exception.
*/
try {
if (n.size() < 1) {
throw new InvalidNameException("Cannot bind empty name");
}
} else {
try {
} catch (NameNotFoundException e) {
}
}
} finally {
}
}
/**
* Bind the object to the specified name.
*
* @throws NamingException if there is a naming exception.
* @throws java.rmi.RemoteException if there is an RMI exception.
*/
throws NamingException {
}
/**
* Finds out if the subcontext specified is present in the current context
*
* @throws NamingException if there is a naming exception
* @throws java.rmi.RemoteException if there is a RMI exception
*/
/* Finds if the name searched for is a type of context or anyother type of
* object.
*/
//TransientContext ctx = (TransientContext) bindings.get(s);
throw new NameNotFoundException(s);
}
if (obj instanceof TransientContext) {
} else {
throw new NameAlreadyBoundException(s);
}
return ctx;
}
/**
* Binds or rebinds the object specified by name
*
* @throws NamingException if there is a naming exception
* @throws java.rmi.RemoteException if there is a RMI exception
*/
throws NamingException {
throw new InvalidNameException("Cannot bind empty name");
}
if (!rebind) {
throw new NameAlreadyBoundException(
"Use rebind to override");
}
}
}
/**
* Rebinds the object specified by name
*
* @throws NamingException if there is a naming exception
* @throws java.rmi.RemoteException if there is a RMI exception
*/
throws NamingException {
try {
if (n.size() < 1) {
throw new InvalidNameException("Cannot bind empty name");
}
} else {
try {
} catch (NameNotFoundException e) {
}
}
} finally {
}
}
/**
* Binds or rebinds the object specified by name
*
* @throws NamingException if there is a naming exception
* @throws java.rmi.RemoteException if there is a RMI exception
*/
throws NamingException {
}
/**
* Unbinds the object specified by name. Traverses down the context tree
* and unbinds the object if required.
*
* @throws NamingException if there is a naming exception
* @throws java.rmi.RemoteException if there is a RMI exception
*/
throw new InvalidNameException("Cannot unbind empty name");
}
throw new NameNotFoundException(
"Cannot find name to unbind");
}
}
/**
* Unbinds the object specified by name. Calls itself recursively to
* traverse down the context tree and unbind the object.
*
* @throws NamingException if there is a naming exception
* @throws java.rmi.RemoteException if there is a RMI exception
*/
try {
if (n.size() < 1) {
throw new InvalidNameException("Cannot unbind empty name");
}
} else {
}
} finally {
}
}
/**
* Unbinds the object specified by name
*
* @throws NamingException if there is a naming exception
* @throws java.rmi.RemoteException if there is a RMI exception
*/
throws NamingException {
}
/**
* Rename the object specified by oldname to newname
*
* @throws NamingException if there is a naming exception
* @throws java.rmi.RemoteException if there is a RMI exception
*/
}
/**
* Rename the object specified by oldname to newname
*
* @throws NamingException if there is a naming exception
* @throws java.rmi.RemoteException if there is a RMI exception
*/
throws NamingException {
throw new InvalidNameException("Cannot rename empty name");
}
try {
// Check if new name exists
throw new NameAlreadyBoundException(newname +
" is already bound");
}
// Check if old name is bound
if (oldBinding == null) {
}
} finally {
}
}
/**
* list the objects stored by the current context
*
* @throws NamingException if there is a naming exception
* @throws java.rmi.RemoteException if there is a RMI exception
*/
try {
} finally {
}
}
/**
* List the objects specified by name.
*
* @throws NamingException if there is a naming exception
* @throws java.rmi.RemoteException if there is a RMI exception
*/
try {
if (debug) {
}
}
if (target instanceof TransientContext) {
}
} finally {
}
}
/**
* List the objects specified by name.
*
* @throws NamingException if there is a naming exception
*/
}
/**
* List the objects specified by name.
*
* @throws NamingException if there is a naming exception
*/
try {
if (debug) {
}
}
}
} finally {
}
}
/**
* List the bindings of objects present in name.
*
* @throws NamingException if there is a naming exception
*/
try {
}
}
} finally {
}
}
/**
* List the binding of objects specified by name.
*
* @throws NamingException if there is a naming exception
*/
}
/**
* Lookup the name.
*
* @throws NamingException if there is a naming exception
*/
// This flat context does not treat links specially
}
/**
* Lookup name.
*
* @throws NamingException if there is a naming exception
*/
// Flat namespace; no federation; just call string version
}
/**
* List the NameParser specified by name.
*
* @throws NamingException if there is a naming exception
*/
return myParser;
}
/**
* List the NameParser specified by name.
*
* @throws NamingException if there is a naming exception
*/
// Flat namespace; no federation; just call string version
}
/**
* Compose a new name specified by name and prefix.
*
* @return null
* @throws NamingException if there is a naming exception
*/
throws NamingException {
return null;
}
/**
* Compose a new name specified by name and prefix.
*
* @return Name result of the concatenation
* @throws NamingException if there is a naming exception
*/
throws NamingException {
return result;
}
/**
* Add the property name and value to the environment.
*
* @throws NamingException if there is a naming exception
*/
throws NamingException {
try {
}
} finally {
}
}
/**
* Remove property from the environment.
*
* @throws NamingException if there is a naming exception
*/
throws NamingException {
try {
return null;
}
} finally {
}
}
/**
* List the current environment.
*
* @throws NamingException if there is a naming exception
*/
try {
// Must return non-null
}
return myEnv;
} finally {
}
}
/**
* Invalidate the current environment.
*/
}
/**
* Operation not supported.
*/
throw new OperationNotSupportedException("getNameInNamespace() " +
"not implemented");
}
/**
* Print the current hashtable.
*/
}
// END OF IASRI 4660742
}
}
}
}
}
public boolean hasMoreElements() {
}
return hasMoreElements();
}
public T nextElement() {
} else {
return null;
}
}
return nextElement();
}
public void close() {
//no-op since no steps needed to free up resources
}
}
// Class for enumerating bmesindings
}
public boolean hasMoreElements() {
return names.hasMoreElements();
}
return hasMoreElements();
}
public T nextElement() {
if (hasMoreElements()) {
} else {
return null;
}
}
return nextElement();
}
public void close() {
//no-op since no steps needed to free up resources
}
}
}