From 2bc8d15a28fafab97cefafede06d6b7e738ae0fe Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Fri, 11 Dec 2009 18:45:45 +0000
Subject: [PATCH] Various incremental improvements.
---
sdk/src/org/opends/sdk/SynchronousConnection.java | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/sdk/src/org/opends/sdk/SynchronousConnection.java b/sdk/src/org/opends/sdk/SynchronousConnection.java
index d1bd6ef..3ebef74 100644
--- a/sdk/src/org/opends/sdk/SynchronousConnection.java
+++ b/sdk/src/org/opends/sdk/SynchronousConnection.java
@@ -33,6 +33,7 @@
import org.opends.sdk.responses.BindResult;
import org.opends.sdk.responses.CompareResult;
import org.opends.sdk.responses.Result;
+import org.opends.sdk.schema.Schema;
import com.sun.opends.sdk.util.Validator;
@@ -270,4 +271,26 @@
return connection.isClosed();
}
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public Schema readSchemaForEntry(DN name)
+ throws ErrorResultException, InterruptedException,
+ UnsupportedOperationException, IllegalStateException
+ {
+ ResultFuture<Schema> future = connection.readSchemaForEntry(name,
+ null, null);
+ try
+ {
+ return future.get();
+ }
+ finally
+ {
+ // Cancel the request if it hasn't completed.
+ future.cancel(false);
+ }
+ }
+
}
--
Gitblit v1.10.0