directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <>
Subject Re: [Client API] Ldap connection object
Date Wed, 01 Apr 2009 07:59:32 GMT
Stefan Seelmann wrote:
> It would be cool configure a connection with default parameters, that
> are used as default for operations. For example the connection could be
> configured with a default search size limit that is used for each search
> request (but could be overwritten of course).
Totally agree. One other thing we _must_ have is a connection pooling 
> Some methods I have in mind:
> setDefaultSearchSizeLimit(int)
> setDefaultSearchTimeLimit(int)
> setDefaultSearchScope(some Enum)
> setDefaultSearchBase(String dn / LdapDN dn)
> setDefaultSearchAttributes(String..attributes)
> setDefaultDerefAliasMethod(some Enum)
> setDefaultReferralsHandlingMethod(some Enum)
Yeah, definitively a good idea. I will add those methods to the 
connection class.
> I think for controls it makes sense to define them per operation type
> because most controls only make sense for a specific operations:
> setDefaultSearchControls(Controls..controls) - like paged search
> setDefaultDeleteControls(Controls..controls) - like tree delete control
> etc.
Well, I think that it's better to have the Controls added to each 
operation object, like BindRequest, SearchRequest...

For instance, you do a
BindRequest br = new BindRequest();
br.addControl( c1 );

Then you call the bind method :

connection.bind( br );

The addControl can use varargs, so you can do addControl( c1, c2, ...)

wdyt ?

cordialement, regards,
Emmanuel L├ęcharny

View raw message