org.ldaptive.provider.jndi
Class JndiStartTLSConnectionFactory

java.lang.Object
  extended by org.ldaptive.provider.AbstractProviderConnectionFactory<JndiProviderConfig>
      extended by 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

Field Summary
 
Fields inherited from class org.ldaptive.provider.AbstractProviderConnectionFactory
logger
 
Constructor Summary
JndiStartTLSConnectionFactory(String url, JndiProviderConfig config, Map<String,Object> env, SSLSocketFactory factory, HostnameVerifier verifier)
          Creates a new jndi startTLS connection factory.
 
Method Summary
protected  JndiStartTLSConnection createInternal(String url)
          Create the provider connection and prepare the connection for use.
protected  StartTlsResponse startTLS(LdapContext ctx)
          This will attempt the startTLS extended operation on the supplied ldap context.
 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

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 to
config - provider configuration
env - jndi context environment
factory - SSL socket factory
verifier - hostname verifier
Method Detail

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.