public class DefaultConnectionHandler extends AbstractConnectionHandler
DefaultConnectionHandler
creates a new LdapContext
using environment properties obtained from LdapConfig.getEnvironment()
.ConnectionHandler.ConnectionStrategy
config, connectionRetryExceptions, connectionStrategy, context, logger
Constructor and Description |
---|
DefaultConnectionHandler()
Default constructor.
|
DefaultConnectionHandler(DefaultConnectionHandler ch)
Copy constructor for
DefaultConnectionHandler . |
DefaultConnectionHandler(LdapConfig lc)
Creates a new
DefaultConnectionHandler with the supplied ldap
config. |
Modifier and Type | Method and Description |
---|---|
protected void |
connectInternal(String authtype,
String dn,
Object credential,
Hashtable<String,Object> env)
Create the initial ldap context and prepare the connection for use.
|
DefaultConnectionHandler |
newInstance()
Returns a separate instance of this connection handler with the same
underlying ldap configuration.
|
close, connect, getConnectionCount, getConnectionRetryExceptions, getConnectionStrategy, getLdapConfig, getLdapContext, isConnected, parseLdapUrl, setConnectionCount, setConnectionRetryExceptions, setConnectionStrategy, setLdapConfig
public DefaultConnectionHandler()
public DefaultConnectionHandler(LdapConfig lc)
DefaultConnectionHandler
with the supplied ldap
config.lc
- ldap configpublic DefaultConnectionHandler(DefaultConnectionHandler ch)
DefaultConnectionHandler
.ch
- to copy properties fromprotected void connectInternal(String authtype, String dn, Object credential, Hashtable<String,Object> env) throws NamingException
connectInternal
in class AbstractConnectionHandler
authtype
- security mechanism to bind withdn
- to bind ascredential
- to bind with in conjunction with dnenv
- to pass to the initial ldap contextNamingException
- if a connection cannot be establishedpublic DefaultConnectionHandler newInstance()
newInstance
in interface ConnectionHandler
newInstance
in class AbstractConnectionHandler
Copyright © 2018. All rights reserved.