directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <>
Subject Re: [Client API] Bind Operation
Date Tue, 31 Mar 2009 13:21:35 GMT
Alex Karasulu wrote:
> On Tue, Mar 31, 2009 at 2:22 PM, Emmanuel Lecharny <>wrote:
>> One more thing :
>> we must handle the controls within the bind operation.
> Request controls should be added to the bind() method in an overload. As a
> List or Set (guess order does not matter).
This is an option. If we don't need to pass any other parameters like 
TimeLimit, that should be enough. I would though pass another parameter 
like the timeout (a client timeout). I don't know about SASL... till 
have to check this guy.

Now, if we have more of those parameters, it would make sense to 
encapsulate them into an class, otherwise we will have hundreds of 
bind') overload ;)
>> That could be done by adding an optionnal extra parameter, like jLDAP does
>> (they are using LdapConstraints)
> Controls are not constraints.
Constraints contain Controls, in jLDAP. It's a container in some way. I 
don't like the name though ...
>> This object contains :
>> - a list of controls
>> - size limit
>> - time limit
>> - referral handling
>> - and a general property allowing you to send server specific parameters (I
>> guess).
> Some things like session controls belong in the session.  
What are 'session controls' ? Controls are related to the operation, 
aren't they? Or I'm missing something ?
> The session should
> also maintain defaults for these parameters which are search specific
> parameters mostly.
>    Users should just be able to override these values on
> the connection while using a SearchControls object for per request overrides
> that one does not want overriding session wide settings in the
> LdapConnection.
That would be a potential problem when using syncrepl, as more than one 
request can be send to the server, and in the meanwhile, another client 
request can set another parameter into the connection. I would rather 
define requests parameters, not defaulting to connection parameters. I 
don't know... At least, I have not a fixed mind about that atm.
> Should we mimic this object ?
> I hate this object.  It's in the Netscape Java LDAP API as well.  I've
> always felt it was awkward to use.
Well we don't have thousands of possibilities here...
* something like LDAPConstraints (whatever the name is)
* a list of parameters (leading to a multiplication of the overloaded 
* or instead of passing more than one parameter to the bind() method, 
just pass a BindRequest parameter, as this object will contain all the 
needed elements (including controls).

>> For instance, size limit and referral handling does not make too much sense
>> for a BindRequest.
> Ok I see what you mean.  Yes we should be operation specific.  This way we
> don't clutter things and the parameters together will make sense.
yeah. But that mean it's a bit less obvious to remember all the 
parameters for each operation. Not an esay choice ...

cordialement, regards,
Emmanuel L├ęcharny

View raw message