| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS. |
| | | * Portions copyright 2011-2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldif; |
| | |
| | | * If {@code connection} was {@code null}. |
| | | */ |
| | | public ConnectionEntryReader(final Connection connection, |
| | | final SearchRequest searchRequest) throws NullPointerException |
| | | final SearchRequest searchRequest) |
| | | { |
| | | this(connection, searchRequest, new LinkedBlockingQueue<Response>()); |
| | | } |
| | |
| | | */ |
| | | public ConnectionEntryReader(final Connection connection, |
| | | final SearchRequest searchRequest, final BlockingQueue<Response> entries) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(connection); |
| | | buffer = new BufferHandler(entries); |
| | |
| | | * search result code indicates that the search operation succeeded. |
| | | */ |
| | | public boolean isEntry() throws ErrorResultIOException, |
| | | InterruptedIOException, NoSuchElementException |
| | | InterruptedIOException |
| | | { |
| | | // Throws ErrorResultIOException if search returned error. |
| | | if (!hasNext()) |
| | |
| | | * search result code indicates that the search operation succeeded. |
| | | */ |
| | | public boolean isReference() throws ErrorResultIOException, |
| | | InterruptedIOException, NoSuchElementException |
| | | InterruptedIOException |
| | | { |
| | | return !isEntry(); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public SearchResultEntry readEntry() throws SearchResultReferenceIOException, |
| | | ErrorResultIOException, InterruptedIOException, NoSuchElementException |
| | | ErrorResultIOException, InterruptedIOException |
| | | { |
| | | if (isEntry()) |
| | | { |
| | |
| | | * search result code indicates that the search operation succeeded. |
| | | */ |
| | | public SearchResultReference readReference() throws ErrorResultIOException, |
| | | InterruptedIOException, NoSuchElementException |
| | | InterruptedIOException |
| | | { |
| | | if (isReference()) |
| | | { |