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/PostOperationPluginResult.java | 57 +++++++++++++--------------------------------------------
1 files changed, 13 insertions(+), 44 deletions(-)
diff --git a/opends/src/server/org/opends/server/api/plugin/PostOperationPluginResult.java b/opends/src/server/org/opends/server/api/plugin/PostOperationPluginResult.java
index 812008d..9899e09 100644
--- a/opends/src/server/org/opends/server/api/plugin/PostOperationPluginResult.java
+++ b/opends/src/server/org/opends/server/api/plugin/PostOperationPluginResult.java
@@ -46,13 +46,22 @@
+ /**
+ * A post-operation plugin result instance that indicates all
+ * processing was successful.
+ */
+ public static final PostOperationPluginResult SUCCESS =
+ new PostOperationPluginResult();
+
+
+
// Indicates whether any further post-operation plugins should be
// invoked for this operation.
- private boolean continuePluginProcessing;
+ private final boolean continuePluginProcessing;
// Indicates whether the post-operation plugin terminated the client
// connection.
- private boolean connectionTerminated;
+ private final boolean connectionTerminated;
@@ -62,12 +71,9 @@
* not been terminated and that further post-operation plugin
* processing should be allowed.
*/
- public PostOperationPluginResult()
+ private PostOperationPluginResult()
{
- assert debugConstructor(CLASS_NAME);
-
- this.connectionTerminated = false;
- this.continuePluginProcessing = true;
+ this(false, true);
}
@@ -115,24 +121,6 @@
/**
- * Specifies whether the post-operation plugin terminated the client
- * connection.
- *
- * @param connectionTerminated Specifies whether the
- * post-operation 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 post-operation plugins should be
* invoked for this operation.
*
@@ -150,25 +138,6 @@
/**
- * Specifies whether any further post-operation plugins should be
- * invoked for this operation.
- *
- * @param continuePluginProcessing Specifies whether any further
- * post-operation plugins should
- * be invoked for this operation.
- */
- public void setContinuePluginProcessing(
- boolean continuePluginProcessing)
- {
- assert debugEnter(CLASS_NAME, "setContinuePluginProcessing",
- String.valueOf(continuePluginProcessing));
-
- this.continuePluginProcessing = continuePluginProcessing;
- }
-
-
-
- /**
* Retrieves a string representation of this post-connect plugin
* result.
*
--
Gitblit v1.10.0