APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.jndi.toolkit.dir

public Class HierMemDirCtx

Additional top-level classes in compilation unit: HierarchicalName, HierarchicalNameParser.

extends Object
implements DirContext
Class Inheritance
All Implemented Interfaces
javax.naming.directory.DirContext, javax.naming.Context
Known Direct Subclasses
com.sun.jndi.ldap.LdapSchemaCtx
Imports
javax.naming.*, javax.naming.directory.*, javax.naming.spi.*, java.util.*

A sample service provider that implements a hierarchical directory in memory. Every operation begins by doing a lookup on the name passed to it and then calls a corresponding "do<OperationName>" on the result of the lookup. The "do<OperationName>" does the work without any further resolution (it assumes that it is the target context).

Nested and Inner Type Summary

Modifier and TypeClass and Description
private abstract class
private class
private class
public class

Field Summary

Modifier and TypeField and Description
private boolean
protected Attributes
protected Hashtable<Name, Object>
private static final boolean
private static final NameParser
protected boolean
protected Hashtable<String, Object>
protected NameParser
protected NamingException

Constructor Summary

AccessConstructor and Description
public
public
HierMemDirCtx(boolean ignoreCase)

public
HierMemDirCtx(Hashtable<String, Object> environment, boolean ignoreCase)

protected
HierMemDirCtx(Hashtable<String, Object> environment, boolean ignoreCase, boolean useFac)

Method Summary

Modifier and TypeMethod and Description
public Object
addToEnvironment(String propName, Object propVal)

Implements javax.naming.Context.addToEnvironment.

Adds a new environment property to the environment of this context.

protected static Attributes
public void
bind(String name, Object obj)

Implements javax.naming.Context.bind.

Binds a name to an object.

public void
bind(Name name, Object obj)

Implements javax.naming.Context.bind.

Binds a name to an object.

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

Implements javax.naming.directory.DirContext.bind.

Binds a name to an object, along with associated attributes.

public void
bind(Name name, Object obj, Attributes attrs)

Implements javax.naming.directory.DirContext.bind.

Binds a name to an object, along with associated attributes.

protected Name
public void
close()

Implements javax.naming.Context.close.

Closes this context.

public String
composeName(String name, String prefix)

Implements javax.naming.Context.composeName.

Composes the name of this context with a name relative to this context.

public Name
composeName(Name name, Name prefix)

Implements javax.naming.Context.composeName.

Composes the name of this context with a name relative to this context.

protected HierMemDirCtx
public Context
createSubcontext(String name)

Implements javax.naming.Context.createSubcontext.

Creates and binds a new context.

public Context
createSubcontext(Name name)

Implements javax.naming.Context.createSubcontext.

Creates and binds a new context.

public DirContext
createSubcontext(String name, Attributes attrs)

Implements javax.naming.directory.DirContext.createSubcontext.

Creates and binds a new context, along with associated attributes.

public DirContext
createSubcontext(Name name, Attributes attrs)

Implements javax.naming.directory.DirContext.createSubcontext.

Creates and binds a new context, along with associated attributes.

public void
destroySubcontext(String name)

Implements javax.naming.Context.destroySubcontext.

Destroys the named context and removes it from the namespace.

public void
destroySubcontext(Name name)

Implements javax.naming.Context.destroySubcontext.

Destroys the named context and removes it from the namespace.

protected void
doBind(Name name, Object obj, Attributes attrs, boolean useFactory)

protected void
doBindAux(Name name, Object obj)

protected DirContext
protected void
protected Attributes
protected Attributes
protected NamingEnumeration<NameClassPair>
protected NamingEnumeration<Binding>
doListBindings(boolean useFactory)

public Object
doLookup(Name name, boolean useFactory)

protected void
protected void
doRebind(Name name, Object obj, Attributes attrs, boolean useFactory)

protected void
doRebindAux(Name name, Object obj)

protected void
doRename(Name oldname, Name newname)

protected void
doUnbind(Name name)

public Attributes
getAttributes(String name)

Implements javax.naming.directory.DirContext.getAttributes.

Retrieves all of the attributes associated with a named object.

public Attributes
getAttributes(Name name)

Implements javax.naming.directory.DirContext.getAttributes.

Retrieves all of the attributes associated with a named object.

public Attributes
getAttributes(String name, String[] attrIds)

Implements javax.naming.directory.DirContext.getAttributes.

Retrieves selected attributes associated with a named object.

public Attributes
getAttributes(Name name, String[] attrIds)

Implements javax.naming.directory.DirContext.getAttributes.

Retrieves selected attributes associated with a named object.

public Hashtable<String, Object>
getEnvironment()

Implements javax.naming.Context.getEnvironment.

Retrieves the environment in effect for this context.

protected Name
protected Name
public String
getNameInNamespace()

Implements javax.naming.Context.getNameInNamespace.

Retrieves the full name of this context within its own namespace.

public NameParser
getNameParser(String name)

Implements javax.naming.Context.getNameParser.

Retrieves the parser associated with the named context.

public NameParser
getNameParser(Name name)

Implements javax.naming.Context.getNameParser.

Retrieves the parser associated with the named context.

public DirContext
getSchema(String name)

Implements javax.naming.directory.DirContext.getSchema.

Retrieves the schema associated with the named object.

public DirContext
getSchema(Name name)

Implements javax.naming.directory.DirContext.getSchema.

Retrieves the schema associated with the named object.

public DirContext
getSchemaClassDefinition(String name)

Implements javax.naming.directory.DirContext.getSchemaClassDefinition.

Retrieves a context containing the schema objects of the named object's class definitions.

public DirContext
getSchemaClassDefinition(Name name)

Implements javax.naming.directory.DirContext.getSchemaClassDefinition.

Retrieves a context containing the schema objects of the named object's class definitions.

private void
init()

public NamingEnumeration<NameClassPair>
list(String name)

Implements javax.naming.Context.list.

Enumerates the names bound in the named context, along with the class names of objects bound to them.

public NamingEnumeration<NameClassPair>
list(Name name)

Implements javax.naming.Context.list.

Enumerates the names bound in the named context, along with the class names of objects bound to them.

public NamingEnumeration<Binding>
listBindings(String name)

Implements javax.naming.Context.listBindings.

Enumerates the names bound in the named context, along with the objects bound to them.

public NamingEnumeration<Binding>
listBindings(Name name)

Implements javax.naming.Context.listBindings.

Enumerates the names bound in the named context, along with the objects bound to them.

public Object
lookup(String name)

Implements javax.naming.Context.lookup.

Retrieves the named object.

public Object
lookup(Name name)

Implements javax.naming.Context.lookup.

Retrieves the named object.

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

Implements javax.naming.directory.DirContext.modifyAttributes.

Modifies the attributes associated with a named object.

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

Implements javax.naming.directory.DirContext.modifyAttributes.

Modifies the attributes associated with a named object.

public void
modifyAttributes(String name, ModificationItem[] mods)

Implements javax.naming.directory.DirContext.modifyAttributes.

Modifies the attributes associated with a named object using an ordered list of modifications.

public void
modifyAttributes(Name name, ModificationItem[] mods)

Implements javax.naming.directory.DirContext.modifyAttributes.

Modifies the attributes associated with a named object using an ordered list of modifications.

public void
rebind(String name, Object obj)

Implements javax.naming.Context.rebind.

Binds a name to an object, overwriting any existing binding.

public void
rebind(Name name, Object obj)

Implements javax.naming.Context.rebind.

Binds a name to an object, overwriting any existing binding.

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

Implements javax.naming.directory.DirContext.rebind.

Binds a name to an object, along with associated attributes, overwriting any existing binding.

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

Implements javax.naming.directory.DirContext.rebind.

Binds a name to an object, along with associated attributes, overwriting any existing binding.

public Object
removeFromEnvironment(String propName)

Implements javax.naming.Context.removeFromEnvironment.

Removes an environment property from the environment of this context.

public void
rename(String oldname, String newname)

Implements javax.naming.Context.rename.

Binds a new name to the object bound to an old name, and unbinds the old name.

public void
rename(Name oldname, Name newname)

Implements javax.naming.Context.rename.

Binds a new name to the object bound to an old name, and unbinds the old name.

public NamingEnumeration<SearchResult>
search(String name, Attributes matchingAttributes)

Implements javax.naming.directory.DirContext.search.

Searches in a single context for objects that contain a specified set of attributes.

public NamingEnumeration<SearchResult>
search(Name name, Attributes matchingAttributes)

Implements javax.naming.directory.DirContext.search.

Searches in a single context for objects that contain a specified set of attributes.

public NamingEnumeration<SearchResult>
search(String name, Attributes matchingAttributes, String[] attributesToReturn)

Implements javax.naming.directory.DirContext.search.

Searches in a single context for objects that contain a specified set of attributes, and retrieves selected attributes.

public NamingEnumeration<SearchResult>
search(Name name, Attributes matchingAttributes, String[] attributesToReturn)

Implements javax.naming.directory.DirContext.search.

Searches in a single context for objects that contain a specified set of attributes, and retrieves selected attributes.

public NamingEnumeration<SearchResult>
search(Name name, String filter, SearchControls cons)

Implements javax.naming.directory.DirContext.search.

Searches in the named context or object for entries that satisfy the given search filter.

public NamingEnumeration<SearchResult>
search(Name name, String filterExpr, Object[] filterArgs, SearchControls cons)

Implements javax.naming.directory.DirContext.search.

Searches in the named context or object for entries that satisfy the given search filter.

public NamingEnumeration<SearchResult>
search(String name, String filter, SearchControls cons)

Implements javax.naming.directory.DirContext.search.

Searches in the named context or object for entries that satisfy the given search filter.

public NamingEnumeration<SearchResult>
search(String name, String filterExpr, Object[] filterArgs, SearchControls cons)

Implements javax.naming.directory.DirContext.search.

Searches in the named context or object for entries that satisfy the given search filter.

public void
setIgnoreCase(boolean ignoreCase)

public void
public void
public void
unbind(String name)

Implements javax.naming.Context.unbind.

Unbinds the named object.

public void
unbind(Name name)

Implements javax.naming.Context.unbind.

Unbinds the named object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait