You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Emmanuel Lecharny <el...@apache.org> on 2008/05/12 14:49:43 UTC

BindHandler and DefaultBindHandler, etc

Hi,

we have a full list of XXXHandler and DefaultXXXHandler classes, the 
former being an abstract class, the second is the implementation. 
Usually we have this inheritence scheme :

public abstract class AbstractLdapHandler implements MessageHandler
public abstract class XXXHandler extends AbstractLdapHandler implements 
MessageHandler
public class DefaultXXXHandler extends XXXHandler

Two questions :
1) why don't we simply merge the XXXHandlers and DefaultXXXHandlers ?
2) The XXXHandler could be declared this way :
public abstract class XXXHandler extends AbstractLdapHandler<XXXRequest> 
instead of implementing the MessageHandler interface, which is already 
implemented by the AbstractLdapHandler. We should also parametrize the 
MessageHandler to MessageHandler<Request>

wdyt ?

-- 
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org



Re: BindHandler and DefaultBindHandler, etc

Posted by Alex Karasulu <ak...@apache.org>.
I'm going to re-factor this crap as soon as JNDI is out of the picture and
Cursors are in place.  Then we can clean up the front-end in a couple hours
while looking at these design flaws.  You can do this now but it might need
another cleanup.  If we wait a bit we can do it all in one shot.

Alex

On Mon, May 12, 2008 at 8:49 AM, Emmanuel Lecharny <el...@apache.org>
wrote:

> Hi,
>
> we have a full list of XXXHandler and DefaultXXXHandler classes, the
> former being an abstract class, the second is the implementation. Usually we
> have this inheritence scheme :
>
> public abstract class AbstractLdapHandler implements MessageHandler
> public abstract class XXXHandler extends AbstractLdapHandler implements
> MessageHandler
> public class DefaultXXXHandler extends XXXHandler
>
> Two questions :
> 1) why don't we simply merge the XXXHandlers and DefaultXXXHandlers ?
> 2) The XXXHandler could be declared this way :
> public abstract class XXXHandler extends AbstractLdapHandler<XXXRequest>
> instead of implementing the MessageHandler interface, which is already
> implemented by the AbstractLdapHandler. We should also parametrize the
> MessageHandler to MessageHandler<Request>
>
> wdyt ?
>
> --
> --
> cordialement, regards,
> Emmanuel Lécharny
> www.iktek.com
> directory.apache.org
>
>
>