org.ldaptive.provider.jndi
Class JndiStartTLSConnection

java.lang.Object
  extended by org.ldaptive.provider.jndi.JndiConnection
      extended by org.ldaptive.provider.jndi.JndiStartTLSConnection
All Implemented Interfaces:
ProviderConnection

public class JndiStartTLSConnection
extends JndiConnection

JNDI provider implementation of ldap operations using startTLS.

Version:
$Revision: 2939 $ $Date: 2014-03-31 10:38:15 -0400 (Mon, 31 Mar 2014) $
Author:
Middleware Services

Nested Class Summary
 
Nested classes/interfaces inherited from class org.ldaptive.provider.jndi.JndiConnection
JndiConnection.JndiExtendedRequest, JndiConnection.JndiExtendedResponse, JndiConnection.JndiSearchIterator
 
Field Summary
 
Fields inherited from class org.ldaptive.provider.jndi.JndiConnection
AUTHENTICATION, BINARY_ATTRIBUTES, CREDENTIALS, DELETE_RDN, DEREF_ALIASES, logger, PRINCIPAL, REFERRAL, SASL_AUTHZ_ID, SASL_MUTUAL_AUTH, SASL_QOP, SASL_REALM, SASL_STRENGTH, TYPES_ONLY
 
Constructor Summary
JndiStartTLSConnection(LdapContext lc, JndiProviderConfig pc)
          Creates a new jndi startTLS connection.
JndiStartTLSConnection(LdapContext lc, JndiProviderConfig pc, StartTlsResponse tlsResponse)
          Creates a new jndi startTLS connection.
 
Method Summary
 void close(RequestControl[] controls)
          Tear down this connection to an LDAP.
 StartTlsResponse getStartTlsResponse()
          Returns the start tls response used by this connection.
 boolean getStopTLSOnClose()
          Returns whether to call StartTlsResponse.close() when close(RequestControl[]) is called.
 void setStartTlsResponse(StartTlsResponse str)
          Sets the start tls response.
 void setStopTLSOnClose(boolean b)
          Sets whether to call StartTlsResponse.close() when close(RequestControl[]) is called.
 
Methods inherited from class org.ldaptive.provider.jndi.JndiConnection
abandon, add, addUnsolicitedNotificationListener, anonymousBind, bind, compare, createResponse, createResponse, delete, extendedOperation, getCompareSearchControls, getLdapContext, getSaslProperties, initializeContext, modify, modifyDn, processNamingException, processResponseControls, removeUnsolicitedNotificationListener, saslBind, search, searchAsync, simpleBind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JndiStartTLSConnection

public JndiStartTLSConnection(LdapContext lc,
                              JndiProviderConfig pc)
Creates a new jndi startTLS connection.

Parameters:
lc - ldap context
pc - provider configuration

JndiStartTLSConnection

public JndiStartTLSConnection(LdapContext lc,
                              JndiProviderConfig pc,
                              StartTlsResponse tlsResponse)
Creates a new jndi startTLS connection.

Parameters:
lc - ldap context
pc - provider configuration
tlsResponse - of successful TLS handshake
Method Detail

getStopTLSOnClose

public boolean getStopTLSOnClose()
Returns whether to call StartTlsResponse.close() when close(RequestControl[]) is called.

Returns:
stop TLS on close

setStopTLSOnClose

public void setStopTLSOnClose(boolean b)
Sets whether to call StartTlsResponse.close() when close(RequestControl[]) is called.

Parameters:
b - stop TLS on close

getStartTlsResponse

public StartTlsResponse getStartTlsResponse()
Returns the start tls response used by this connection.

Returns:
start tls response

setStartTlsResponse

public void setStartTlsResponse(StartTlsResponse str)
Sets the start tls response.

Parameters:
str - start tls response

close

public void close(RequestControl[] controls)
           throws LdapException
Tear down this connection to an LDAP.

Specified by:
close in interface ProviderConnection
Overrides:
close in class JndiConnection
Parameters:
controls - request controls
Throws:
LdapException - if an LDAP error occurs


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