org.springframework.ldap.pool
Class DelegatingLdapContext
java.lang.Object
org.springframework.ldap.pool.DelegatingContext
org.springframework.ldap.pool.DelegatingDirContext
org.springframework.ldap.pool.DelegatingLdapContext
- All Implemented Interfaces:
- javax.naming.Context, javax.naming.directory.DirContext, javax.naming.ldap.LdapContext, DirContextProxy
public class DelegatingLdapContext
- extends DelegatingDirContext
- implements javax.naming.ldap.LdapContext
Used by PoolingContextSource
to wrap a LdapContext
, delegating most methods
to the underlying context. This class extends DelegatingDirContext
which handles returning
the context to the pool on a call to close()
- Author:
- Eric Dalquist
Fields inherited from interface javax.naming.ldap.LdapContext |
CONTROL_FACTORIES |
Fields inherited from interface javax.naming.directory.DirContext |
ADD_ATTRIBUTE, REMOVE_ATTRIBUTE, REPLACE_ATTRIBUTE |
Fields inherited from interface javax.naming.Context |
APPLET, 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 Summary |
DelegatingLdapContext(org.apache.commons.pool.KeyedObjectPool keyedObjectPool,
javax.naming.ldap.LdapContext delegateLdapContext,
DirContextType dirContextType)
Create a new delegating ldap context for the specified pool, context and context type. |
Methods inherited from class org.springframework.ldap.pool.DelegatingDirContext |
bind, bind, createSubcontext, createSubcontext, getAttributes, getAttributes, getAttributes, getAttributes, getDelegateContext, getInnermostDelegateDirContext, getSchema, getSchema, getSchemaClassDefinition, getSchemaClassDefinition, getTargetContext, modifyAttributes, modifyAttributes, modifyAttributes, modifyAttributes, rebind, rebind, search, search, search, search, search, search, search, search |
Methods inherited from class org.springframework.ldap.pool.DelegatingContext |
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, unbind |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.naming.directory.DirContext |
bind, bind, createSubcontext, createSubcontext, getAttributes, getAttributes, getAttributes, getAttributes, getSchema, getSchema, getSchemaClassDefinition, getSchemaClassDefinition, modifyAttributes, modifyAttributes, modifyAttributes, modifyAttributes, rebind, rebind, search, search, search, search, search, search, search, search |
Methods inherited from interface javax.naming.Context |
addToEnvironment, 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, unbind |
DelegatingLdapContext
public DelegatingLdapContext(org.apache.commons.pool.KeyedObjectPool keyedObjectPool,
javax.naming.ldap.LdapContext delegateLdapContext,
DirContextType dirContextType)
- Create a new delegating ldap context for the specified pool, context and context type.
- Parameters:
keyedObjectPool
- The pool the delegate context was checked out from.delegateLdapContext
- The ldap context to delegate operations to.dirContextType
- The type of context, used as a key for the pool.
- Throws:
java.lang.IllegalArgumentException
- if any of the arguments are null
getDelegateLdapContext
public javax.naming.ldap.LdapContext getDelegateLdapContext()
- Returns:
- The direct delegate for this ldap context proxy
getDelegateDirContext
public javax.naming.directory.DirContext getDelegateDirContext()
- Overrides:
getDelegateDirContext
in class DelegatingDirContext
- Returns:
- The direct delegate for this dir context proxy
getInnermostDelegateLdapContext
public javax.naming.ldap.LdapContext getInnermostDelegateLdapContext()
- Recursivley inspect delegates until a non-delegating ldap context is found.
- Returns:
- The innermost (real) DirContext that is being delegated to.
assertOpen
protected void assertOpen()
throws javax.naming.NamingException
- Overrides:
assertOpen
in class DelegatingDirContext
- Throws:
javax.naming.NamingException
- If the delegate is null, DelegatingContext.close()
has been called.
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class DelegatingDirContext
- See Also:
Object.equals(java.lang.Object)
hashCode
public int hashCode()
- Overrides:
hashCode
in class DelegatingDirContext
- See Also:
Object.hashCode()
toString
public java.lang.String toString()
- Overrides:
toString
in class DelegatingDirContext
- See Also:
Object.toString()
extendedOperation
public javax.naming.ldap.ExtendedResponse extendedOperation(javax.naming.ldap.ExtendedRequest request)
throws javax.naming.NamingException
- Specified by:
extendedOperation
in interface javax.naming.ldap.LdapContext
- Throws:
javax.naming.NamingException
- See Also:
LdapContext.extendedOperation(javax.naming.ldap.ExtendedRequest)
getConnectControls
public javax.naming.ldap.Control[] getConnectControls()
throws javax.naming.NamingException
- Specified by:
getConnectControls
in interface javax.naming.ldap.LdapContext
- Throws:
javax.naming.NamingException
- See Also:
LdapContext.getConnectControls()
getRequestControls
public javax.naming.ldap.Control[] getRequestControls()
throws javax.naming.NamingException
- Specified by:
getRequestControls
in interface javax.naming.ldap.LdapContext
- Throws:
javax.naming.NamingException
- See Also:
LdapContext.getRequestControls()
getResponseControls
public javax.naming.ldap.Control[] getResponseControls()
throws javax.naming.NamingException
- Specified by:
getResponseControls
in interface javax.naming.ldap.LdapContext
- Throws:
javax.naming.NamingException
- See Also:
LdapContext.getResponseControls()
newInstance
public javax.naming.ldap.LdapContext newInstance(javax.naming.ldap.Control[] requestControls)
throws javax.naming.NamingException
- Specified by:
newInstance
in interface javax.naming.ldap.LdapContext
- Throws:
javax.naming.NamingException
- See Also:
LdapContext.newInstance(javax.naming.ldap.Control[])
reconnect
public void reconnect(javax.naming.ldap.Control[] connCtls)
throws javax.naming.NamingException
- Specified by:
reconnect
in interface javax.naming.ldap.LdapContext
- Throws:
javax.naming.NamingException
- See Also:
LdapContext.reconnect(javax.naming.ldap.Control[])
setRequestControls
public void setRequestControls(javax.naming.ldap.Control[] requestControls)
throws javax.naming.NamingException
- Specified by:
setRequestControls
in interface javax.naming.ldap.LdapContext
- Throws:
javax.naming.NamingException
- See Also:
LdapContext.setRequestControls(javax.naming.ldap.Control[])
close
public void close()
throws javax.naming.NamingException
- Specified by:
close
in interface javax.naming.Context
- Overrides:
close
in class DelegatingDirContext
- Throws:
javax.naming.NamingException
- See Also:
DelegatingDirContext.close()
Copyright (c) 2005-2007. All Rights Reserved.