directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@gmail.com>
Subject Re: [LDAP] Removing LdapMessageHandler interface
Date Wed, 14 Mar 2007 20:17:44 GMT
Enrique Rodriguez a écrit :

> On 3/14/07, Emmanuel Lecharny <elecharny@gmail.com> wrote:
>
>> ...
>> I bet that would not be a good idea to remove LdapMessageHandler : it's
>> use to initialize MINA. We iterate through all the declared handler in
>> LdapProtocolProvider and initialize each handler using reflection...
>
>
> Actually, it would leave MINA's MessageHandler in the hierarchy, so
> the casting just switches to MessageHandler instead of
> LdapMessageHandler.  MINA typically uses MessageHandler to do
> demuxing, anyway.  

LdapMessageHandler extends MessageHandler.

> In fact, this refactoring would open up the
> possibility of directly using the demux handler in MINA.  Furthermore,
> it is MessageHandler that provides the method messageReceived that is
> used in the current handler demux.  The init() method of
> LdapMessageHandler is called with the cfg but it is unnecessary.

It's unnecessary now, but we migth use it later. In my mind, having an 
intermedirary interface for Ldap message does not harm, and can have 
some advantages, in the futur. It would be a pity that we have to 
reintroduce this interface later for some unknown usage...

>
> This is really a trivial change.  In fact I did it already locally to
> make sure it would work perfectly.

At this point, I guess that Alex may have a better knowledge of this 
piece of code, and about the reason we have this interface in the first 
place...

Alex ?

>
> Enrique
>


Mime
View raw message