public class TransactionAwareContextSourceProxy extends DelegatingBaseLdapPathContextSourceSupport implements ContextSource
TransactionAwareDirContextInvocationHandler
.Constructor and Description |
---|
TransactionAwareContextSourceProxy(ContextSource target)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
DirContext |
getContext(String principal,
String credentials)
Gets a
DirContext instance authenticated using the supplied
principal and credentials. |
DirContext |
getReadOnlyContext()
Gets a read-only
DirContext . |
DirContext |
getReadWriteContext()
Gets a read-write
DirContext instance. |
ContextSource |
getTarget()
Get the target ContextSource.
|
getBaseLdapName, getBaseLdapPath, getBaseLdapPathAsString
public TransactionAwareContextSourceProxy(ContextSource target)
target
- the target ContextSource.public ContextSource getTarget()
DelegatingBaseLdapPathContextSourceSupport
getTarget
in class DelegatingBaseLdapPathContextSourceSupport
public DirContext getReadOnlyContext()
ContextSource
DirContext
. The returned
DirContext
must be possible to perform read-only operations
on.getReadOnlyContext
in interface ContextSource
public DirContext getReadWriteContext()
ContextSource
DirContext
instance.getReadWriteContext
in interface ContextSource
DirContext
instance, never null
.public DirContext getContext(String principal, String credentials)
ContextSource
DirContext
instance authenticated using the supplied
principal and credentials. Typically to be used for plain authentication
purposes. Note that this method will never make use
of native Java LDAP pooling, even though this instance is configured to do so.
This is to force password changes in the target directory to take effect
as soon as possible.getContext
in interface ContextSource
principal
- The principal (typically a distinguished name of a user
in the LDAP tree) to use for authentication.credentials
- The credentials to use for authentication.DirContext
instance, never
null
.