directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Enrique Rodriguez" <enriqu...@gmail.com>
Subject Re: [LDAP] Removing LdapMessageHandler interface
Date Wed, 14 Mar 2007 20:34:07 GMT
On 3/14/07, Emmanuel Lecharny <elecharny@gmail.com> wrote:
> 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.

Right.  Sorry if I didn't make that clear, I am proposing to remove
LdapMessageHandler but keep the handlers as implementing
MessageHandler.

> ...
> 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...

I would rather grow into needing an interface.  I was able to remove
it in 5-10 minutes, so if someday we need a new interface, we can
certainly add one back.  Also, in my experience on numerous protocols,
you can alway pass what you need to handlers in MINA's
messageReceived() method as part of the IoSession.  For now this
interface is simply adding dead weight in the form of a do-nothing
init() method on every handler.

Enrique

Mime
View raw message