org.ldaptive.provider.jndi
Class JndiConnectionFactory

java.lang.Object
  extended by org.ldaptive.provider.AbstractProviderConnectionFactory<JndiProviderConfig>
      extended by org.ldaptive.provider.jndi.JndiConnectionFactory
All Implemented Interfaces:
ProviderConnectionFactory<JndiProviderConfig>

public class JndiConnectionFactory
extends AbstractProviderConnectionFactory<JndiProviderConfig>

Creates connections using the JNDI InitialLdapContext class.

Version:
$Revision: 3141 $ $Date: 2016-03-14 14:11:10 -0400 (Mon, 14 Mar 2016) $
Author:
Middleware Services

Field Summary
 
Fields inherited from class org.ldaptive.provider.AbstractProviderConnectionFactory
logger
 
Constructor Summary
JndiConnectionFactory(String url, JndiProviderConfig config, Map<String,Object> env)
          Creates a new jndi connection factory.
 
Method Summary
protected  JndiConnection createInternal(String url)
          Create the provider connection and prepare the connection for use.
protected  Map<String,Object> getEnvironment()
          Returns the JNDI environment for this connection factory.
 String toString()
          
 
Methods inherited from class org.ldaptive.provider.AbstractProviderConnectionFactory
create, getMetadata, getProviderConfig
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JndiConnectionFactory

public JndiConnectionFactory(String url,
                             JndiProviderConfig config,
                             Map<String,Object> env)
Creates a new jndi connection factory.

Parameters:
url - of the ldap to connect to
config - provider configuration
env - jndi context environment
Method Detail

getEnvironment

protected Map<String,Object> getEnvironment()
Returns the JNDI environment for this connection factory. This map cannot be modified.

Returns:
jndi environment

createInternal

protected JndiConnection createInternal(String url)
                                 throws LdapException
Create the provider connection and prepare the connection for use.

Specified by:
createInternal in class AbstractProviderConnectionFactory<JndiProviderConfig>
Parameters:
url - to connect to
Returns:
provider connection
Throws:
LdapException - if a connection cannot be established

toString

public String toString()

Overrides:
toString in class AbstractProviderConnectionFactory<JndiProviderConfig>


Copyright © 2003-2017 Virginia Tech. All Rights Reserved.