directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <>
Subject Re: Control interface
Date Mon, 31 Jan 2011 12:13:27 GMT
On 1/31/11 1:05 PM, Stefan Seelmann wrote:
> On Mon, Jan 31, 2011 at 12:08 PM, Emmanuel Lecharny<>  wrote:
>> Hi,
>> in the new Control interface we are now using (not the JNDI one), we don't
>> expose the getValue() setValue() hasValue() methods. In many respects, those
>> methods are useless, and we don't use them in the server.
>> However, from a user perspective, someone writing some code on top of the
>> LDAP API, connected to an unknown server, and getting back some unknown
>> control, will have no way to get the inner values, unless casting the
>> control using the ControlDecorator interface.
>> This is wrong. I think we must expose the three methods to the world.
> If the user receives an unknown control, what can he do with the value
> then? He must be able to decode the ASN.1 BER encoded value anyway,
> right? Then he can also write a new Control class. Am I missing
> something?
He can write a new Control class, but he can also get the opaque value 
and send it to another server.

I mean, there are probably use cases where we want to get the value, not 
decoding it, and use it to do something else.

Should we force the users to write their own Controls in such a case? 
Isn't it better to provide a generic control with accessors for the 
value? Ins't it a bit over killing to ask the LdapAPI users to implement 
their own controls in order for them to manipulate this value?

The alternative is to implement all known controls into the API...

Emmanuel L├ęcharny

View raw message