From 7fc00840744292c3c138a7dffa187b073960e5a2 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Tue, 14 May 2013 07:13:05 +0000
Subject: [PATCH] OPENDJ-858 (CR-1680) Add stats tracking to HTTP client connections

---
 opends/src/server/org/opends/server/protocols/http/SdkConnectionAdapter.java |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/opends/src/server/org/opends/server/protocols/http/SdkConnectionAdapter.java b/opends/src/server/org/opends/server/protocols/http/SdkConnectionAdapter.java
index 737b542..7d6e6fb 100644
--- a/opends/src/server/org/opends/server/protocols/http/SdkConnectionAdapter.java
+++ b/opends/src/server/org/opends/server/protocols/http/SdkConnectionAdapter.java
@@ -80,7 +80,6 @@
 import org.opends.server.core.SearchOperationBasis;
 import org.opends.server.core.UnbindOperation;
 import org.opends.server.core.UnbindOperationBasis;
-import org.opends.server.loggers.HTTPRequestInfo;
 import org.opends.server.loggers.debug.DebugTracer;
 import org.opends.server.protocols.ldap.AbandonRequestProtocolOp;
 import org.opends.server.protocols.ldap.AddRequestProtocolOp;
@@ -116,9 +115,6 @@
   /** The HTTP client connection being "adapted". */
   private final HTTPClientConnection clientConnection;
 
-  /** The HTTP request information to log. */
-  private final HTTPRequestInfo requestInfo;
-
   /**
    * The next message ID (and operation ID) that should be used for this
    * connection.
@@ -139,14 +135,10 @@
    *
    * @param clientConnection
    *          the HTTP client connection being "adapted"
-   * @param requestInfo
-   *          the HTTP request information to log
    */
-  public SdkConnectionAdapter(HTTPClientConnection clientConnection,
-      HTTPRequestInfo requestInfo)
+  public SdkConnectionAdapter(HTTPClientConnection clientConnection)
   {
     this.clientConnection = clientConnection;
-    this.requestInfo = requestInfo;
     this.queueingStrategy =
         new BoundedWorkQueueStrategy(clientConnection.getConnectionHandler()
             .getCurrentConfig().getMaxConcurrentOpsPerConnection());
@@ -330,7 +322,7 @@
 
     // At this point, we try to log the request with OK status code.
     // If it was already logged, it will be a no op.
-    this.requestInfo.log(HttpServletResponse.SC_OK);
+    this.clientConnection.log(HttpServletResponse.SC_OK);
 
     isClosed = true;
   }

--
Gitblit v1.10.0