Hi,
Attached is an HTML file describing briefly how LDAP connections will be handled and pooled by the LDAP Service manager. The LDAP service will be responsible for creating new LDAP connections, as well as shutting them down when not used for a certain amount of time. Again, this is a first draft, so feedback and comments are much appreciated. -- Leif file:/u/leif/Services.html |
LDAP ServiceThe LDAP service object will be responsible for managing two types of objects, nsLDAPConnection and nsLDAPServer. The latter interface is new, and will hold all authentication and credential information related to a certain LDAP servers preference. It depends on nsLDAPURL. Get/Set methods for username, password and, eventually, certificate/PSM handles are avialable, as well as any other information related to the LDAP server (e.g. max number of entries to return, timeouts etc.).We have two alternatives to populate the LDAP Service with nsLDAPServer objects.
The LDAP Service implements a GetServer method, which takes as an argument the unique identifier, perhaps from the LDAP preferences (e.g. "ldap1"). It will return the nsLDAPServer object related to the specific LDAP server. This will later be used to request a connection from the LDAP Service. The LDAP service object also implements a GetConnection() method. It will take one argument, an nsLDAPServer handle. The service will then return a ready to use LDAP connection object (nsLDAPConnection). This is possibly a brand new connection, a connection that's been reconnected after a timeout, or one that's already available and ready to use (cached). But in either case, we promise that the connection is live and functional when returned to the client. Example:
ldapID = <LDAP server prefs ID selected, e.g. 'ldap1'>; ldapServer = service->GetServer(ldapID);
|