From 32034d853f3a284424ccfa87b6de210f1ca814e1 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Tue, 29 Nov 2011 00:31:21 +0000
Subject: [PATCH] Fix OPENDJ-43 (Synchronous Connection decorator implementations should not use AsynchronousConnections) and OPENDJ-328 (Make it easier to implement connection decorators).
---
opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldif/ConnectionEntryReader.java | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldif/ConnectionEntryReader.java b/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldif/ConnectionEntryReader.java
index b1029ab..053da05 100644
--- a/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldif/ConnectionEntryReader.java
+++ b/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldif/ConnectionEntryReader.java
@@ -23,6 +23,7 @@
*
*
* Copyright 2010 Sun Microsystems, Inc.
+ * Portions copyright 2011 ForgeRock AS.
*/
package org.forgerock.opendj.ldif;
@@ -46,10 +47,10 @@
/**
- * A {@code ConnectionEntryReader} is a bridge from
- * {@code AsynchronousConnection}s to {@code EntryReader}s. A connection entry
- * reader allows applications to iterate over search results as they are
- * returned from the server during a search operation.
+ * A {@code ConnectionEntryReader} is a bridge from {@code Connection}s to
+ * {@code EntryReader}s. A connection entry reader allows applications to
+ * iterate over search results as they are returned from the server during a
+ * search operation.
* <p>
* The Search operation is performed synchronously, blocking until a search
* result entry is received. If a search result indicates that the search
@@ -207,7 +208,7 @@
* @throws NullPointerException
* If {@code connection} was {@code null}.
*/
- public ConnectionEntryReader(final AsynchronousConnection connection,
+ public ConnectionEntryReader(final Connection connection,
final SearchRequest searchRequest) throws NullPointerException
{
this(connection, searchRequest, new LinkedBlockingQueue<Response>());
@@ -229,13 +230,13 @@
* @throws NullPointerException
* If {@code connection} was {@code null}.
*/
- public ConnectionEntryReader(final AsynchronousConnection connection,
+ public ConnectionEntryReader(final Connection connection,
final SearchRequest searchRequest, final BlockingQueue<Response> entries)
throws NullPointerException
{
Validator.ensureNotNull(connection);
buffer = new BufferHandler(entries);
- future = connection.search(searchRequest, buffer);
+ future = connection.searchAsync(searchRequest, null, buffer);
}
--
Gitblit v1.10.0