directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Zoerner <>
Subject Implementing a simple interceptor: Adding it to the chain
Date Sat, 06 Feb 2010 20:38:07 GMT
Hi all,

in order to complete the examples in our Advanced User's Guide for 
ApacheDS, I have started to create and document a simple interceptor as 
a starting point for developers, who are interested to extend the server 
that way.

It would be great if those who know the internals of the server would 
review the example and check whether it is OK. Although it works, there 
is probably still room for improvement. Any feedback is highly appreciated.

If the page is reviewed and complete, I will move it to the Advanced 
User's Guide (chapter 6. Extending the server).

And at least one thing is probably wrong in the example: The position of 
the interceptor within the chain. Currently, I simply add it at the end 
with this code:

DirectoryService directoryService = new DefaultDirectoryService();

LdapServer ldapServer = new LdapServer();

List<Interceptor> is = directoryService.getInterceptors();
is.add(new PasswordHashInterceptor());

Any recommendations where to add it in the list, and how to accomplish 
the task of a positional addition, e.g. "after SubentryInterceptor"?

The default list of interceptors goes this:


Thanks in advance,

View raw message