edu.vt.middleware.ldap.handler
Class DefaultConnectionHandler
java.lang.Object
edu.vt.middleware.ldap.handler.AbstractConnectionHandler
edu.vt.middleware.ldap.handler.DefaultConnectionHandler
- All Implemented Interfaces:
- ConnectionHandler
- Direct Known Subclasses:
- TlsConnectionHandler
public class DefaultConnectionHandler
- extends AbstractConnectionHandler
DefaultConnectionHandler creates a new LdapContext
using environment properties obtained from LdapConfig.getEnvironment().
- Version:
- $Revision: 1442 $
- Author:
- Middleware Services
| Methods inherited from class edu.vt.middleware.ldap.handler.AbstractConnectionHandler |
close, connect, getConnectionCount, getConnectionRetryExceptions, getConnectionStrategy, getLdapConfig, getLdapContext, isConnected, parseLdapUrl, setConnectionCount, setConnectionRetryExceptions, setConnectionStrategy, setLdapConfig |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultConnectionHandler
public DefaultConnectionHandler()
- Default constructor.
DefaultConnectionHandler
public DefaultConnectionHandler(LdapConfig lc)
- Creates a new
DefaultConnectionHandler with the supplied ldap
config.
- Parameters:
lc - ldap config
DefaultConnectionHandler
public DefaultConnectionHandler(DefaultConnectionHandler ch)
- Copy constructor for
DefaultConnectionHandler.
- Parameters:
ch - to copy properties from
connectInternal
protected void connectInternal(String authtype,
String dn,
Object credential,
Hashtable<String,Object> env)
throws NamingException
- Create the initial ldap context and prepare the connection for use.
- Specified by:
connectInternal in class AbstractConnectionHandler
- Parameters:
authtype - security mechanism to bind withdn - to bind ascredential - to bind with in conjunction with dnenv - to pass to the initial ldap context
- Throws:
NamingException - if a connection cannot be established
newInstance
public DefaultConnectionHandler newInstance()
- Returns a separate instance of this connection handler with the same
underlying ldap configuration.
- Specified by:
newInstance in interface ConnectionHandler- Specified by:
newInstance in class AbstractConnectionHandler
- Returns:
- connection handler
Copyright © 2003-2010 Virginia Tech. All Rights Reserved.