Interface ILdapConnFactory
- All Known Implementing Classes:
LdapAnonConnFactory,LdapBoundConnFactory
public interface ILdapConnFactory
Maintains a pool of connections to the LDAP server.
Multiple threads use this interface to utilize and release
the Ldap connection resources.
- Version:
- $Revision$, $Date$
-
Method Summary
Modifier and TypeMethodDescriptionintfreeConn()Returns the number of free connections available from this pool.netscape.ldap.LDAPConnectiongetConn()Request access to a Ldap connection from the pool.intmaxConn()Returns the maximum number of connections available from this pool.voidreset()Used for disconnecting all connections.voidreturnConn(netscape.ldap.LDAPConnection conn) Return connection to the factory.intReturns the number of total connections available from this pool.
-
Method Details
-
reset
Used for disconnecting all connections. Used just before a subsystem shutdown or process exit. -
freeConn
int freeConn()Returns the number of free connections available from this pool.- Returns:
- Integer number of free connections.
-
totalConn
int totalConn()Returns the number of total connections available from this pool. Includes sum of free and in use connections.- Returns:
- Integer number of total connections.
-
maxConn
int maxConn()Returns the maximum number of connections available from this pool.- Returns:
- Integer maximum number of connections.
-
getConn
Request access to a Ldap connection from the pool.- Returns:
- Ldap connection object. connection is not available
- Throws:
ELdapException- if any error occurs, such as a
-
returnConn
Return connection to the factory. mandatory after a getConn().- Parameters:
conn- Ldap connection object to be returned to the free list of the pool.- Throws:
ELdapException- On any failure to return the connection.
-