|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ConnectionHandler
ConnectionHandler provides an interface for creating and closing LDAP connections.
| Nested Class Summary | |
|---|---|
static class |
ConnectionHandler.ConnectionStrategy
Enum to define the type of connection strategy. |
| Method Summary | |
|---|---|
void |
close()
Close a connection to an LDAP. |
void |
connect(String dn,
Object credential)
Open a connection to an LDAP. |
Class<?>[] |
getConnectionRetryExceptions()
This returns the exception types to retry connections on. |
ConnectionHandler.ConnectionStrategy |
getConnectionStrategy()
Returns the connection strategy. |
LdapConfig |
getLdapConfig()
Returns the ldap configuration. |
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(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. |
| Method Detail |
|---|
ConnectionHandler.ConnectionStrategy getConnectionStrategy()
void setConnectionStrategy(ConnectionHandler.ConnectionStrategy strategy)
strategy - for making connectionsClass<?>[] getConnectionRetryExceptions()
Class[]void setConnectionRetryExceptions(Class<?>[] exceptions)
exceptions - Class[]LdapConfig getLdapConfig()
void setLdapConfig(LdapConfig lc)
lc - ldap config
void connect(String dn,
Object credential)
throws NamingException
dn - to attempt bind withcredential - to attempt bind with
NamingException - if an LDAP error occursboolean isConnected()
LdapContext getLdapContext()
throws NamingException
connect(String,
Object) must be called prior to invoking this.
NamingException - if an LDAP error occurs
void close()
throws NamingException
NamingException - if an LDAP error occursConnectionHandler newInstance()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||