edu.vt.middleware.ldap.handler
public interface ConnectionHandler
| Modifier and Type | Interface and Description |
|---|---|
static class |
ConnectionHandler.ConnectionStrategy
Enum to define the type of connection strategy.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close a connection to an LDAP.
|
void |
connect(java.lang.String dn,
java.lang.Object credential)
Open a connection to an LDAP.
|
java.lang.Class<?>[] |
getConnectionRetryExceptions()
This returns the exception types to retry connections on.
|
ConnectionHandler.ConnectionStrategy |
getConnectionStrategy()
Returns the connection strategy.
|
LdapConfig |
getLdapConfig()
Returns the ldap configuration.
|
javax.naming.ldap.LdapContext |
getLdapContext()
Returns an ldap context to use for ldap operations.
|
boolean |
isConnected()
Returns whether the underlying context has been established.
|
ConnectionHandler |
newInstance()
Returns a separate instance of this connection handler with the same
underlying ldap configuration.
|
void |
setConnectionRetryExceptions(java.lang.Class<?>[] exceptions)
This sets the exception types to retry connections on.
|
void |
setConnectionStrategy(ConnectionHandler.ConnectionStrategy strategy)
Sets the connection strategy.
|
void |
setLdapConfig(LdapConfig lc)
Sets the ldap configuration.
|
ConnectionHandler.ConnectionStrategy getConnectionStrategy()
void setConnectionStrategy(ConnectionHandler.ConnectionStrategy strategy)
strategy - for making connectionsjava.lang.Class<?>[] getConnectionRetryExceptions()
Class[]void setConnectionRetryExceptions(java.lang.Class<?>[] exceptions)
exceptions - Class[]LdapConfig getLdapConfig()
void setLdapConfig(LdapConfig lc)
lc - ldap configvoid connect(java.lang.String dn,
java.lang.Object credential)
throws javax.naming.NamingException
dn - to attempt bind withcredential - to attempt bind withjavax.naming.NamingException - if an LDAP error occursboolean isConnected()
javax.naming.ldap.LdapContext getLdapContext()
throws javax.naming.NamingException
connect(String,
Object) must be called prior to invoking this.javax.naming.NamingException - if an LDAP error occursvoid close()
throws javax.naming.NamingException
javax.naming.NamingException - if an LDAP error occursConnectionHandler newInstance()
Copyright © 2014. All Rights Reserved.