public void added(Collection listeners) {
for (final ListenerInfo info : (Collection<ListenerInfo>) listeners) {
if (!info.isRemoved()) {
log.info("Adding listener " + info);
LDAPExpr expr = LDAPParser.parseExpression(info.getFilter());
expr.visit(new ExprVisitor() {
public void visitExpr(LDAPExpr expr) {
if (expr instanceof SimpleTerm) {
SimpleTerm term = (SimpleTerm) expr;
if (term.getName().equals(Constants.OBJECTCLASS)) {
watcher.addWatch(term.getRval(), info.getFilter());