unls.add(listener);
}
}
private void notifyPersistenSearchListener(Element element) {
PersistentSearchResult psr = (PersistentSearchResult) ((SearchOp) element.response
.getResponseOp()).getSearchResult();
// test error
if (psr.getResult() != null) {
psr.receiveNotificationHook(psr.getResult());
}
// notify listener
Control[] cs = element.response.getControls();
if (cs != null) {
for (int i = 0; i < cs.length; i++) {
Control control = cs[i];
if (ECNotificationControl.OID.equals(control.getID())) {
psr.receiveNotificationHook(new ECNotificationControl(
control.getEncodedValue()));
}
}
}
}