Package com.netscape.certsrv.ldap
Interface ILdapConnFactory
-
- All Known Implementing Classes:
LdapAnonConnFactory,LdapBoundConnFactory
public interface ILdapConnFactoryMaintains 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intfreeConn()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.inttotalConn()Returns the number of total connections available from this pool.
-
-
-
Method Detail
-
reset
void reset() throws ELdapExceptionUsed for disconnecting all connections. Used just before a subsystem shutdown or process exit.- Throws:
EldapException- on Ldap failure when closing connections.ELdapException
-
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
netscape.ldap.LDAPConnection getConn() throws ELdapExceptionRequest 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
void returnConn(netscape.ldap.LDAPConnection conn) throws ELdapExceptionReturn 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.
-
-