public class DelegatingDirContext extends DelegatingContext implements DirContext, DirContextProxy
PooledContextSource to wrap a DirContext, delegating most methods
to the underlying context. This class extends DelegatingContext which handles returning
the context to the pool on a call to close()ADD_ATTRIBUTE, REMOVE_ATTRIBUTE, REPLACE_ATTRIBUTEAPPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXES| Constructor and Description |
|---|
DelegatingDirContext(KeyedObjectPool<Object,Object> keyedObjectPool,
DirContext delegateDirContext,
DirContextType dirContextType)
Create a new delegating dir context for the specified pool, context and context type.
|
addToEnvironment, bind, bind, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, getEnvironment, getInnermostDelegateContext, getNameInNamespace, getNameParser, getNameParser, list, list, listBindings, listBindings, lookup, lookup, lookupLink, lookupLink, rebind, rebind, removeFromEnvironment, rename, rename, unbind, unbindclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddToEnvironment, bind, bind, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, getEnvironment, getNameInNamespace, getNameParser, getNameParser, list, list, listBindings, listBindings, lookup, lookup, lookupLink, lookupLink, rebind, rebind, removeFromEnvironment, rename, rename, unbind, unbindpublic DelegatingDirContext(KeyedObjectPool<Object,Object> keyedObjectPool, DirContext delegateDirContext, DirContextType dirContextType)
keyedObjectPool - The pool the delegate context was checked out from.delegateDirContext - The dir context to delegate operations to.dirContextType - The type of context, used as a key for the pool.IllegalArgumentException - if any of the arguments are nullpublic DirContext getDelegateDirContext()
public Context getDelegateContext()
getDelegateContext in class DelegatingContextpublic DirContext getInnermostDelegateDirContext()
protected void assertOpen()
throws NamingException
assertOpen in class DelegatingContextNamingException - If the delegate is null, DelegatingContext.close() has been called.public boolean equals(Object obj)
equals in class DelegatingContextObject.equals(Object)public int hashCode()
hashCode in class DelegatingContextObject.hashCode()public String toString()
toString in class DelegatingContextObject.toString()public DirContext getTargetContext()
DirContextProxyDirContext of the proxy.getTargetContext in interface DirContextProxyDirContext.public void bind(Name name, Object obj, Attributes attrs) throws NamingException
bind in interface DirContextNamingExceptionDirContext.bind(Name, Object, Attributes)public void bind(String name, Object obj, Attributes attrs) throws NamingException
bind in interface DirContextNamingExceptionDirContext.bind(String, Object, Attributes)public DirContext createSubcontext(Name name, Attributes attrs) throws NamingException
createSubcontext in interface DirContextNamingExceptionDirContext.createSubcontext(Name, Attributes)public DirContext createSubcontext(String name, Attributes attrs) throws NamingException
createSubcontext in interface DirContextNamingExceptionDirContext.createSubcontext(String, Attributes)public Attributes getAttributes(Name name, String[] attrIds) throws NamingException
getAttributes in interface DirContextNamingExceptionDirContext.getAttributes(Name, String[])public Attributes getAttributes(Name name) throws NamingException
getAttributes in interface DirContextNamingExceptionDirContext.getAttributes(Name)public Attributes getAttributes(String name, String[] attrIds) throws NamingException
getAttributes in interface DirContextNamingExceptionDirContext.getAttributes(String, String[])public Attributes getAttributes(String name) throws NamingException
getAttributes in interface DirContextNamingExceptionDirContext.getAttributes(String)public DirContext getSchema(Name name) throws NamingException
getSchema in interface DirContextNamingExceptionDirContext.getSchema(Name)public DirContext getSchema(String name) throws NamingException
getSchema in interface DirContextNamingExceptionDirContext.getSchema(String)public DirContext getSchemaClassDefinition(Name name) throws NamingException
getSchemaClassDefinition in interface DirContextNamingExceptionDirContext.getSchemaClassDefinition(Name)public DirContext getSchemaClassDefinition(String name) throws NamingException
getSchemaClassDefinition in interface DirContextNamingExceptionDirContext.getSchemaClassDefinition(String)public void modifyAttributes(Name name, int modOp, Attributes attrs) throws NamingException
modifyAttributes in interface DirContextNamingExceptionDirContext.modifyAttributes(Name, int, Attributes)public void modifyAttributes(Name name, ModificationItem[] mods) throws NamingException
modifyAttributes in interface DirContextNamingExceptionDirContext.modifyAttributes(Name, ModificationItem[])public void modifyAttributes(String name, int modOp, Attributes attrs) throws NamingException
modifyAttributes in interface DirContextNamingExceptionDirContext.modifyAttributes(String, int, Attributes)public void modifyAttributes(String name, ModificationItem[] mods) throws NamingException
modifyAttributes in interface DirContextNamingExceptionDirContext.modifyAttributes(String, ModificationItem[])public void rebind(Name name, Object obj, Attributes attrs) throws NamingException
rebind in interface DirContextNamingExceptionDirContext.rebind(Name, Object, Attributes)public void rebind(String name, Object obj, Attributes attrs) throws NamingException
rebind in interface DirContextNamingExceptionDirContext.rebind(String, Object, Attributes)public NamingEnumeration<SearchResult> search(Name name, Attributes matchingAttributes, String[] attributesToReturn) throws NamingException
search in interface DirContextNamingExceptionDirContext.search(Name, Attributes, String[])public NamingEnumeration<SearchResult> search(Name name, Attributes matchingAttributes) throws NamingException
search in interface DirContextNamingExceptionDirContext.search(Name, Attributes)public NamingEnumeration<SearchResult> search(Name name, String filterExpr, Object[] filterArgs, SearchControls cons) throws NamingException
search in interface DirContextNamingExceptionDirContext.search(Name, String, Object[], SearchControls)public NamingEnumeration<SearchResult> search(Name name, String filter, SearchControls cons) throws NamingException
search in interface DirContextNamingExceptionDirContext.search(Name, String, SearchControls)public NamingEnumeration<SearchResult> search(String name, Attributes matchingAttributes, String[] attributesToReturn) throws NamingException
search in interface DirContextNamingExceptionDirContext.search(String, Attributes, String[])public NamingEnumeration<SearchResult> search(String name, Attributes matchingAttributes) throws NamingException
search in interface DirContextNamingExceptionDirContext.search(String, Attributes)public NamingEnumeration<SearchResult> search(String name, String filterExpr, Object[] filterArgs, SearchControls cons) throws NamingException
search in interface DirContextNamingExceptionDirContext.search(String, String, Object[], SearchControls)public NamingEnumeration<SearchResult> search(String name, String filter, SearchControls cons) throws NamingException
search in interface DirContextNamingExceptionDirContext.search(String, String, SearchControls)public void close()
throws NamingException
close in interface Contextclose in class DelegatingContextNamingExceptionDelegatingContext.close()