org.springframework.ldap.support
Class LdapContextSource

java.lang.Object
  extended by org.springframework.ldap.support.AbstractContextSource
      extended by org.springframework.ldap.support.LdapContextSource
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, ContextSource

public class LdapContextSource
extends AbstractContextSource

ContextSource implementation which creates an InitialLdapContext instance. For configuration information, see AbstractContextSource.

Author:
Mattias Arthursson, Adam Skogman, Ulrik Sandberg
See Also:
AbstractContextSource

Field Summary
 
Fields inherited from class org.springframework.ldap.support.AbstractContextSource
password, SUN_LDAP_POOLING_FLAG, userName
 
Constructor Summary
LdapContextSource()
           
 
Method Summary
protected  java.util.Hashtable getAnonymousEnv()
           
protected  javax.naming.directory.DirContext getDirContextInstance(java.util.Hashtable environment)
          Implement in subclass to create a DirContext of the desired type (e.g.
 void setResponseControlFactory(java.lang.Class responseControlFactory)
          Set the ResponseControlFactory to use.
 
Methods inherited from class org.springframework.ldap.support.AbstractContextSource
afterPropertiesSet, assembleProviderUrlString, getAuthenticatedEnv, getExceptionTranslator, getReadOnlyContext, getReadWriteContext, getUrls, setAnonymousReadOnly, setAuthenticationSource, setBase, setBaseEnvironmentProperties, setCacheEnvironmentProperties, setContextFactory, setDirObjectFactory, setExceptionTranslator, setPassword, setPooled, setupAuthenticatedEnvironment, setUrl, setUrls, setUserName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LdapContextSource

public LdapContextSource()
Method Detail

getAnonymousEnv

protected java.util.Hashtable getAnonymousEnv()
Overrides:
getAnonymousEnv in class AbstractContextSource

getDirContextInstance

protected javax.naming.directory.DirContext getDirContextInstance(java.util.Hashtable environment)
                                                           throws javax.naming.NamingException
Description copied from class: AbstractContextSource
Implement in subclass to create a DirContext of the desired type (e.g. InitialDirContext or InitialLdapContext).

Specified by:
getDirContextInstance in class AbstractContextSource
Parameters:
environment - the environment to use when creating the instance.
Returns:
a new DirContext instance.
Throws:
javax.naming.NamingException - if one is encountered when creating the instance.

setResponseControlFactory

public void setResponseControlFactory(java.lang.Class responseControlFactory)
Set the ResponseControlFactory to use. Default is ResponseControlFactory. The specified class needs to be an implementation of ControlFactory.

Parameters:
responseControlFactory - the ResponseControlFactory to be used. Null means reset to the default.


Copyright 2002-2006. All Rights Reserved.