org.ldaptive.provider.jndi
Class JndiStartTLSConnectionFactory
java.lang.Object
org.ldaptive.provider.AbstractProviderConnectionFactory<JndiProviderConfig>
org.ldaptive.provider.jndi.JndiStartTLSConnectionFactory
- All Implemented Interfaces:
- ProviderConnectionFactory<JndiProviderConfig>
public class JndiStartTLSConnectionFactory
- extends AbstractProviderConnectionFactory<JndiProviderConfig>
Creates connections using the JNDI InitialLdapContext class with the
startTLS extended operation.
- Version:
- $Revision: 2974 $ $Date: 2014-04-21 15:29:45 -0400 (Mon, 21 Apr 2014) $
- Author:
- Middleware Services
JndiStartTLSConnectionFactory
public JndiStartTLSConnectionFactory(String url,
JndiProviderConfig config,
Map<String,Object> env,
SSLSocketFactory factory,
HostnameVerifier verifier)
- Creates a new jndi startTLS connection factory.
- Parameters:
url - of the ldap to connect toconfig - provider configurationenv - jndi context environmentfactory - SSL socket factoryverifier - hostname verifier
createInternal
protected JndiStartTLSConnection 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
startTLS
protected StartTlsResponse startTLS(LdapContext ctx)
throws NamingException,
IOException
- This will attempt the startTLS extended operation on the supplied ldap
context.
- Parameters:
ctx - ldap context
- Returns:
- start tls response
- Throws:
NamingException - if an error occurs while requesting an extended
operation
IOException - if an error occurs while negotiating TLS
toString
public String toString()
-
- Overrides:
toString in class AbstractProviderConnectionFactory<JndiProviderConfig>
Copyright © 2003-2017 Virginia Tech. All Rights Reserved.