This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.naming.directory
class InitialDirContext

java.lang.Object extended by javax.naming.InitialContext extended by javax.naming.directory.InitialDirContext
All Implemented Interfaces:
Context, DirContext
Direct Known Subclasses:
InitialLdapContext

Most common way to construct:

Hashtable environment = …;

InitialDirContext root = new InitialDirContext(environment);

Based on 19 examples


public class InitialDirContext
extends InitialContext
implements DirContext

This class is the starting context for performing directory operations. The documentation in the class description of InitialContext (including those for synchronization) apply here.


Field Summary
 
Fields inherited from class javax.naming.InitialContext
defaultInitCtx, gotDefault, myProps
 
Constructor Summary
 

          Constructs an initial DirContext.
protected
InitialDirContext(boolean lazy)

          Constructs an initial DirContext with the option of not initializing it.
 

          Constructs an initial DirContext using the supplied environment.
 
Method Summary
 void
bind(Name name, Object obj, Attributes attrs)

          
 void
bind(String name, Object obj, Attributes attrs)

          
 DirContext

          
 DirContext

          
 Attributes

          
 Attributes
getAttributes(Name name, String[] attrIds)

          
 Attributes

          
 Attributes
getAttributes(String name, String[] attrIds)

          
 DirContext

          
 DirContext

          
 DirContext

          
 DirContext

          
 void
modifyAttributes(Name name, int mod_op, Attributes attrs)

          
 void

          
 void
modifyAttributes(String name, int mod_op, Attributes attrs)

          
 void

          
 void
rebind(Name name, Object obj, Attributes attrs)

          
 void
rebind(String name, Object obj, Attributes attrs)

          
 NamingEnumeration
search(Name name, Attributes matchingAttributes)

          
 NamingEnumeration
search(Name name, Attributes matchingAttributes, String[] attributesToReturn)

          
 NamingEnumeration
search(Name name, String filterExpr, Object[] filterArgs, SearchControls cons)

          
 NamingEnumeration
search(Name name, String filter, SearchControls cons)

          
 NamingEnumeration
search(String name, Attributes matchingAttributes)

          
 NamingEnumeration
search(String name, Attributes matchingAttributes, String[] attributesToReturn)

          
 NamingEnumeration
search(String name, String filterExpr, Object[] filterArgs, SearchControls cons)

          
 NamingEnumeration
search(String name, String filter, SearchControls cons)

          
 
Methods inherited from class javax.naming.InitialContext
addToEnvironment, bind, bind, close, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, doLookup, doLookup, getDefaultInitCtx, getEnvironment, getNameInNamespace, getNameParser, getNameParser, getURLOrDefaultInitCtx, getURLOrDefaultInitCtx, init, list, list, listBindings, listBindings, lookup, lookup, lookupLink, lookupLink, rebind, rebind, removeFromEnvironment, rename, rename, unbind, unbind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InitialDirContext

public InitialDirContext()
                  throws NamingException
Constructs an initial DirContext. No environment properties are supplied. Equivalent to new InitialDirContext(null).

Throws:
NamingException - if a naming exception is encountered

InitialDirContext

protected InitialDirContext(boolean lazy)
                     throws NamingException
Constructs an initial DirContext with the option of not initializing it. This may be used by a constructor in a subclass when the value of the environment parameter is not yet known at the time the InitialDirContext constructor is called. The subclass's constructor will call this constructor, compute the value of the environment, and then call init() before returning.

Parameters:
lazy - true means do not initialize the initial DirContext; false is equivalent to calling new InitialDirContext()
Throws:
NamingException - if a naming exception is encountered

InitialDirContext

public InitialDirContext(Hashtable environment)
                  throws NamingException
Constructs an initial DirContext using the supplied environment. Environment properties are discussed in the javax.naming.InitialContext class description.

This constructor will not modify environment or save a reference to it, but may save a clone.

Parameters:
environment - environment used to create the initial DirContext. Null indicates an empty environment.
Throws:
NamingException - if a naming exception is encountered
Method Detail

bind

public void bind(Name name,
                 Object obj,
                 Attributes attrs)
          throws NamingException
Parameters:
name
obj
attrs
Throws:
NamingException

bind

public void bind(String name,
                 Object obj,
                 Attributes attrs)
          throws NamingException
Parameters:
name
obj
attrs
Throws:
NamingException

createSubcontext

public DirContext createSubcontext(Name name,
                                   Attributes attrs)
                            throws NamingException
Parameters:
name
attrs
Throws:
NamingException

createSubcontext

public DirContext createSubcontext(String name,
                                   Attributes attrs)
                            throws NamingException
Parameters:
name
attrs
Throws:
NamingException

getAttributes

public Attributes getAttributes(Name name)
                         throws NamingException
Parameters:
name
Throws:
NamingException

getAttributes

public Attributes getAttributes(Name name,
                                String[] attrIds)
                         throws NamingException
Parameters:
name
attrIds
Throws:
NamingException

getAttributes

public Attributes getAttributes(String name)
                         throws NamingException
Parameters:
name
Throws:
NamingException

getAttributes

public Attributes getAttributes(String name,
                                String[] attrIds)
                         throws NamingException
Parameters:
name
attrIds
Throws:
NamingException

getSchema

public DirContext getSchema(Name name)
                     throws NamingException
Parameters:
name
Throws:
NamingException

getSchema

public DirContext getSchema(String name)
                     throws NamingException
Parameters:
name
Throws:
NamingException

getSchemaClassDefinition

public DirContext getSchemaClassDefinition(Name name)
                                    throws NamingException
Parameters:
name
Throws:
NamingException

getSchemaClassDefinition

public DirContext getSchemaClassDefinition(String name)
                                    throws NamingException
Parameters:
name
Throws:
NamingException

modifyAttributes

public void modifyAttributes(Name name,
                             int mod_op,
                             Attributes attrs)
                      throws NamingException
Parameters:
name
mod_op
attrs
Throws:
NamingException

modifyAttributes

public void modifyAttributes(Name name,
                             ModificationItem[] mods)
                      throws NamingException
Parameters:
name
mods
Throws:
NamingException

modifyAttributes

public void modifyAttributes(String name,
                             int mod_op,
                             Attributes attrs)
                      throws NamingException
Parameters:
name
mod_op
attrs
Throws:
NamingException

modifyAttributes

public void modifyAttributes(String name,
                             ModificationItem[] mods)
                      throws NamingException
Parameters:
name
mods
Throws:
NamingException

rebind

public void rebind(Name name,
                   Object obj,
                   Attributes attrs)
            throws NamingException
Parameters:
name
obj
attrs
Throws:
NamingException

rebind

public void rebind(String name,
                   Object obj,
                   Attributes attrs)
            throws NamingException
Parameters:
name
obj
attrs
Throws:
NamingException

search

public NamingEnumeration search(Name name,
                                Attributes matchingAttributes)
                         throws NamingException
Parameters:
name
matchingAttributes
Throws:
NamingException

search

public NamingEnumeration search(Name name,
                                Attributes matchingAttributes,
                                String[] attributesToReturn)
                         throws NamingException
Parameters:
name
matchingAttributes
attributesToReturn
Throws:
NamingException

search

public NamingEnumeration search(Name name,
                                String filterExpr,
                                Object[] filterArgs,
                                SearchControls cons)
                         throws NamingException
Parameters:
name
filterExpr
filterArgs
cons
Throws:
NamingException

search

public NamingEnumeration search(Name name,
                                String filter,
                                SearchControls cons)
                         throws NamingException
Parameters:
name
filter
cons
Throws:
NamingException

search

public NamingEnumeration search(String name,
                                Attributes matchingAttributes)
                         throws NamingException
Parameters:
name
matchingAttributes
Throws:
NamingException

search

public NamingEnumeration search(String name,
                                Attributes matchingAttributes,
                                String[] attributesToReturn)
                         throws NamingException
Parameters:
name
matchingAttributes
attributesToReturn
Throws:
NamingException

search

public NamingEnumeration search(String name,
                                String filterExpr,
                                Object[] filterArgs,
                                SearchControls cons)
                         throws NamingException
Parameters:
name
filterExpr
filterArgs
cons
Throws:
NamingException

search

public NamingEnumeration search(String name,
                                String filter,
                                SearchControls cons)
                         throws NamingException
Parameters:
name
filter
cons
Throws:
NamingException


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.