public class TransactionAwareContextSourceProxy extends Object 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.
|
public TransactionAwareContextSourceProxy(ContextSource target)
target
- the target ContextSource.public ContextSource getTarget()
public DirContext getReadOnlyContext() throws NamingException
ContextSource
DirContext
. The returned
DirContext
must be possible to perform read-only operations
on.getReadOnlyContext
in interface ContextSource
NamingException
- if some error occurs creating an DirContext.public DirContext getReadWriteContext() throws NamingException
ContextSource
DirContext
instance.getReadWriteContext
in interface ContextSource
DirContext
instance, never null
.NamingException
- if some error occurs creating an
DirContext
.public DirContext getContext(String principal, String credentials) throws NamingException
ContextSource
DirContext
instance authenticated using the supplied
principal and credentials.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
.NamingException
Copyright © 2005–2016 The Spring LDAP Framework. All rights reserved.