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/PostDisconnectPluginResult.java |   36 ++++++++++++------------------------
 1 files changed, 12 insertions(+), 24 deletions(-)

diff --git a/opends/src/server/org/opends/server/api/plugin/PostDisconnectPluginResult.java b/opends/src/server/org/opends/server/api/plugin/PostDisconnectPluginResult.java
index 6be84b1..9e16591 100644
--- a/opends/src/server/org/opends/server/api/plugin/PostDisconnectPluginResult.java
+++ b/opends/src/server/org/opends/server/api/plugin/PostDisconnectPluginResult.java
@@ -46,9 +46,18 @@
 
 
 
+  /**
+   * A post-disconnect plugin result instance that indicates all
+   * processing was successful.
+   */
+  public static final PostDisconnectPluginResult SUCCESS =
+       new PostDisconnectPluginResult();
+
+
+
   // Indicates whether any further post-disconnect plugins should be
   // invoked for this connection.
-  private boolean continuePluginProcessing;
+  private final boolean continuePluginProcessing;
 
 
 
@@ -57,11 +66,9 @@
    * settings.  In this case, it will indicate that the further
    * post-disconnect plugin processing should be allowed.
    */
-  public PostDisconnectPluginResult()
+  private PostDisconnectPluginResult()
   {
-    assert debugConstructor(CLASS_NAME);
-
-    this.continuePluginProcessing = true;
+    this(true);
   }
 
 
@@ -102,25 +109,6 @@
 
 
   /**
-   * Specifies whether any further post-disconnect plugins should be
-   * invoked for this connection.
-   *
-   * @param  continuePluginProcessing  Specifies whether any further
-   *                                   post-disconnect plugins should
-   *                                   be invoked for this connection.
-   */
-  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