From bb40b9a02cf40af0349d8e3576f51133d264d4b1 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Tue, 10 Oct 2006 15:23:18 +0000
Subject: [PATCH] Make all of the plugin result objects immutable, and create a default SUCCESS instance for each of them that may be used if all processing completed successfully. Update all uses of the plugin result objects to use this SUCCESS instance where applicable.
---
opends/src/server/org/opends/server/api/plugin/SearchReferencePluginResult.java | 100 +++++++------------------------------------------
1 files changed, 15 insertions(+), 85 deletions(-)
diff --git a/opends/src/server/org/opends/server/api/plugin/SearchReferencePluginResult.java b/opends/src/server/org/opends/server/api/plugin/SearchReferencePluginResult.java
index 23cfba4..bf924b2 100644
--- a/opends/src/server/org/opends/server/api/plugin/SearchReferencePluginResult.java
+++ b/opends/src/server/org/opends/server/api/plugin/SearchReferencePluginResult.java
@@ -46,21 +46,30 @@
+ /**
+ * A search reference plugin result instance that indicates all
+ * processing was successful.
+ */
+ public static final SearchReferencePluginResult SUCCESS =
+ new SearchReferencePluginResult();
+
+
+
// Indicates whether any further search result reference plugins
// should be invoked for this operation.
- private boolean continuePluginProcessing;
+ private final boolean continuePluginProcessing;
// Indicates whether processing should continue for the associated
// search operation.
- private boolean continueSearch;
+ private final boolean continueSearch;
// Indicates whether the search result reference plugin terminated
// the client connection.
- private boolean connectionTerminated;
+ private final boolean connectionTerminated;
// Indicates whether the associated reference should be sent to the
// client.
- private boolean sendReference;
+ private final boolean sendReference;
@@ -72,14 +81,9 @@
* to the client, and that processing on the search operation should
* continue.
*/
- public SearchReferencePluginResult()
+ private SearchReferencePluginResult()
{
- assert debugConstructor(CLASS_NAME);
-
- this.connectionTerminated = false;
- this.continuePluginProcessing = true;
- this.sendReference = true;
- this.continueSearch = true;
+ this(false, true, true, true);
}
@@ -137,24 +141,6 @@
/**
- * Specifies whether the search result reference plugin terminated
- * the client connection.
- *
- * @param connectionTerminated Specifies whether the search result
- * reference plugin terminated the
- * client connection.
- */
- public void setConnectionTerminated(boolean connectionTerminated)
- {
- assert debugEnter(CLASS_NAME, "setConnectionTerminated",
- String.valueOf(connectionTerminated));
-
- this.connectionTerminated = connectionTerminated;
- }
-
-
-
- /**
* Indicates whether any further search result reference plugins
* should be invoked for this operation.
*
@@ -172,26 +158,6 @@
/**
- * Specifies whether any further search result reference plugins
- * should be invoked for this operation.
- *
- * @param continuePluginProcessing Specifies whether any further
- * search result reference plugins
- * should be invoked for this
- * operation.
- */
- public void setContinuePluginProcessing(
- boolean continuePluginProcessing)
- {
- assert debugEnter(CLASS_NAME, "setContinuePluginProcessing",
- String.valueOf(continuePluginProcessing));
-
- this.continuePluginProcessing = continuePluginProcessing;
- }
-
-
-
- /**
* Indicates whether the associated search result reference should
* be sent to the client.
*
@@ -209,24 +175,6 @@
/**
- * Specifies whether the associated search result reference should
- * be sent to the client.
- *
- * @param sendReference Specifies whether the associated search
- * result reference should be sent to the
- * client.
- */
- public void setSendReference(boolean sendReference)
- {
- assert debugEnter(CLASS_NAME, "setSendReference",
- String.valueOf(sendReference));
-
- this.sendReference = sendReference;
- }
-
-
-
- /**
* Indicates whether processing should continue for the associated
* search operation (i.e., if it should continue looking for more
* matching entries).
@@ -244,24 +192,6 @@
/**
- * Specifies whether processing should continue for the associated
- * search operation.
- *
- * @param continueSearch Specifies whether processing should
- * continue for the associated search
- * operation.
- */
- public void setContinueSearch(boolean continueSearch)
- {
- assert debugEnter(CLASS_NAME, "setContinueSearch",
- String.valueOf(continueSearch));
-
- this.continueSearch = continueSearch;
- }
-
-
-
- /**
* Retrieves a string representation of this search result reference
* plugin result.
*
--
Gitblit v1.10.0