Package org.springframework.ldap.pool2
Class MutableDelegatingLdapContext
java.lang.Object
org.springframework.ldap.pool2.DelegatingContext
org.springframework.ldap.pool2.DelegatingDirContext
org.springframework.ldap.pool2.DelegatingLdapContext
org.springframework.ldap.pool2.MutableDelegatingLdapContext
- All Implemented Interfaces:
Context,DirContext,LdapContext,DirContextProxy
Used by
MutablePooledContextSource to wrap a LdapContext, delegating
most methods to the underlying context. This class extends
DelegatingLdapContext, allowing request controls to be set on the wrapped ldap
context. This enables the Spring LDAP pooling to be used for scenarios such as paged
results.- Since:
- 2.0
-
Field Summary
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_PREFIXESFields inherited from interface javax.naming.directory.DirContext
ADD_ATTRIBUTE, REMOVE_ATTRIBUTE, REPLACE_ATTRIBUTEFields inherited from interface javax.naming.ldap.LdapContext
CONTROL_FACTORIES -
Constructor Summary
ConstructorsConstructorDescriptionMutableDelegatingLdapContext(org.apache.commons.pool2.KeyedObjectPool keyedObjectPool, LdapContext delegateLdapContext, DirContextType dirContextType) Create a new mutable delegating ldap context for the specified pool, context and context type. -
Method Summary
Methods inherited from class org.springframework.ldap.pool2.DelegatingLdapContext
assertOpen, close, equals, extendedOperation, getConnectControls, getDelegateDirContext, getDelegateLdapContext, getInnermostDelegateLdapContext, getRequestControls, getResponseControls, hashCode, newInstance, reconnect, toStringMethods inherited from class org.springframework.ldap.pool2.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, searchMethods inherited from class org.springframework.ldap.pool2.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, unbindMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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, unbindMethods 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
-
Constructor Details
-
MutableDelegatingLdapContext
public MutableDelegatingLdapContext(org.apache.commons.pool2.KeyedObjectPool keyedObjectPool, LdapContext delegateLdapContext, DirContextType dirContextType) Create a new mutable 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:
IllegalArgumentException- if any of the arguments are null
-
-
Method Details
-
setRequestControls
- Specified by:
setRequestControlsin interfaceLdapContext- Overrides:
setRequestControlsin classDelegatingLdapContext- Throws:
NamingException- See Also:
-