Java example source code file (DirectoryManager.java)
This example Java source code file (DirectoryManager.java) is included in the alvinalexander.com
"Java Source Code
Warehouse" project. The intent of this project is to help you "Learn
Java by Example" TM.
The DirectoryManager.java Java example source code
/*
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package javax.naming.spi;
import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.Name;
import javax.naming.Reference;
import javax.naming.Referenceable;
import javax.naming.NamingException;
import javax.naming.CannotProceedException;
import javax.naming.directory.DirContext;
import javax.naming.directory.Attributes;
import com.sun.naming.internal.ResourceManager;
import com.sun.naming.internal.FactoryEnumeration;
/**
* This class contains methods for supporting <tt>DirContext
* implementations.
*<p>
* This class is an extension of <tt>NamingManager. It contains methods
* for use by service providers for accessing object factories and
* state factories, and for getting continuation contexts for
* supporting federation.
*<p>
* <tt>DirectoryManager is safe for concurrent access by multiple threads.
*<p>
* Except as otherwise noted,
* a <tt>Name, Attributes, or environment parameter
* passed to any method is owned by the caller.
* The implementation will not modify the object or keep a reference
* to it, although it may keep a reference to a clone or copy.
*
* @author Rosanna Lee
* @author Scott Seligman
*
* @see DirObjectFactory
* @see DirStateFactory
* @since 1.3
*/
public class DirectoryManager extends NamingManager {
/*
* Disallow anyone from creating one of these.
*/
DirectoryManager() {}
/**
* Creates a context in which to continue a <tt>DirContext operation.
* Operates just like <tt>NamingManager.getContinuationContext(),
* only the continuation context returned is a <tt>DirContext.
*
* @param cpe
* The non-null exception that triggered this continuation.
* @return A non-null <tt>DirContext object for continuing the operation.
* @exception NamingException If a naming exception occurred.
*
* @see NamingManager#getContinuationContext(CannotProceedException)
*/
@SuppressWarnings("unchecked")
public static DirContext getContinuationDirContext(
CannotProceedException cpe) throws NamingException {
Hashtable<Object,Object> env = (Hashtable
Other Java examples (source code examples)
Here is a short list of links related to this Java DirectoryManager.java source code file: