From fbda6e0892dcfcc8dd43d21f6fb134aabb8d0cac Mon Sep 17 00:00:00 2001
From: jarnou <jarnou@localhost>
Date: Tue, 03 Jul 2007 09:29:17 +0000
Subject: [PATCH] Commits the refactoring of the core server to provide support for proxy/distribution/virtual functionnalities. This includes the new set of local operations, as well as the workflow and networkgroup support.

---
 opends/src/server/org/opends/server/core/UnbindOperation.java |   68 ++++++++-------------------------
 1 files changed, 17 insertions(+), 51 deletions(-)

diff --git a/opends/src/server/org/opends/server/core/UnbindOperation.java b/opends/src/server/org/opends/server/core/UnbindOperation.java
index 03b920a..44363ac 100644
--- a/opends/src/server/org/opends/server/core/UnbindOperation.java
+++ b/opends/src/server/org/opends/server/core/UnbindOperation.java
@@ -32,11 +32,13 @@
 import java.util.List;
 
 import org.opends.server.api.ClientConnection;
+import org.opends.server.loggers.debug.DebugLogger;
+import org.opends.server.loggers.debug.DebugTracer;
+import org.opends.server.types.AbstractOperation;
 import org.opends.server.types.CancelRequest;
 import org.opends.server.types.CancelResult;
 import org.opends.server.types.Control;
 import org.opends.server.types.DisconnectReason;
-import org.opends.server.types.Operation;
 import org.opends.server.types.OperationType;
 import org.opends.server.types.operation.PostOperationUnbindOperation;
 import org.opends.server.types.operation.PreParseUnbindOperation;
@@ -52,19 +54,14 @@
  * between the client and the Directory Server.
  */
 public class UnbindOperation
-       extends Operation
+       extends AbstractOperation
        implements PreParseUnbindOperation, PostOperationUnbindOperation
 {
 
-
-
-  // The time that processing started on this operation.
-  private long processingStartTime;
-
-  // The time that processing ended on this operation.
-  private long processingStopTime;
-
-
+  /**
+   * The tracer object for the debug logger.
+   */
+  private static final DebugTracer TRACER = DebugLogger.getTracer();
 
   /**
    * Creates a new unbind operation with the provided information.
@@ -180,45 +177,13 @@
     // An unbind operation can never have a response, so just ignore this.
   }
 
-
-
   /**
-   * {@inheritDoc}
+   * Performs the work of actually processing this operation.  This
+   * should include all processing for the operation, including
+   * invoking plugins, logging messages, performing access control,
+   * managing synchronization, and any other work that might need to
+   * be done in the course of processing.
    */
-  @Override()
-  public long getProcessingStartTime()
-  {
-    return processingStartTime;
-  }
-
-
-
-  /**
-   * {@inheritDoc}
-   */
-  @Override()
-  public long getProcessingStopTime()
-  {
-    return processingStopTime;
-  }
-
-
-
-  /**
-   * {@inheritDoc}
-   */
-  @Override()
-  public long getProcessingTime()
-  {
-    return (processingStopTime - processingStartTime);
-  }
-
-
-
-  /**
-   * {@inheritDoc}
-   */
-  @Override()
   public final void run()
   {
     // Get the plugin config manager that will be used for invoking plugins.
@@ -226,7 +191,7 @@
          DirectoryServer.getPluginConfigManager();
     boolean skipPostOperation = false;
 
-    processingStartTime = System.currentTimeMillis();
+    setProcessingStartTime();
 
 
     // Invoke the pre-parse unbind plugins.  We don't care about the result
@@ -250,7 +215,7 @@
     // Invoke the post-operation unbind plugins.
     pluginConfigManager.invokePostOperationUnbindPlugins(this);
 
-    processingStopTime = System.currentTimeMillis();
+    setProcessingStopTime();
   }
 
 
@@ -282,7 +247,7 @@
    * {@inheritDoc}
    */
   @Override()
-  protected boolean setCancelRequest(CancelRequest cancelRequest)
+  public boolean setCancelRequest(CancelRequest cancelRequest)
   {
     // Unbind operations cannot be canceled.
     return false;
@@ -302,5 +267,6 @@
     buffer.append(operationID);
     buffer.append(")");
   }
+
 }
 

--
Gitblit v1.10.0