| | |
| | | private InitialLdapContext ctx; |
| | | private Set<EntryReadListener> listeners = new HashSet<EntryReadListener>(); |
| | | private boolean isOver; |
| | | private boolean notifyListeners; |
| | | |
| | | /** |
| | | * Constructor of the entry reader. |
| | |
| | | { |
| | | this.dn = dn; |
| | | this.ctx = ctx; |
| | | this.notifyListeners = true; |
| | | } |
| | | |
| | | /** |
| | |
| | | public void backgroundTaskCompleted(CustomSearchResult sr, |
| | | Throwable throwable) |
| | | { |
| | | if (!isInterrupted()) |
| | | if (!isInterrupted() && isNotifyListeners()) |
| | | { |
| | | if (throwable == null) |
| | | { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Returns whether this entry reader will notify the listeners once it is |
| | | * over. |
| | | * @return whether this entry reader will notify the listeners once it is |
| | | * over. |
| | | */ |
| | | public boolean isNotifyListeners() |
| | | { |
| | | return notifyListeners; |
| | | } |
| | | |
| | | /** |
| | | * Sets whether this entry reader will notify the listeners once it is |
| | | * over. |
| | | * @param notifyListeners whether this entry reader will notify the listeners |
| | | * once it is over. |
| | | */ |
| | | public void setNotifyListeners(boolean notifyListeners) |
| | | { |
| | | this.notifyListeners = notifyListeners; |
| | | } |
| | | |
| | | /** |
| | | * Returns <CODE>true</CODE> if the read process is over and |
| | | * <CODE>false</CODE> otherwise. |
| | | * @return <CODE>true</CODE> if the read process is over and |