From c96af91cdd11f79c11e56d6c7fe33d0edc653ea3 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Mon, 15 Apr 2013 12:08:55 +0000
Subject: [PATCH] OPENDJ-832 (CR-1545) Leverage the work queue for processing requests received on the HTTP connection handler
---
opends/src/server/org/opends/server/protocols/http/HTTPConnectionHandler.java | 32 ++++++++++++++++++++++----------
1 files changed, 22 insertions(+), 10 deletions(-)
diff --git a/opends/src/server/org/opends/server/protocols/http/HTTPConnectionHandler.java b/opends/src/server/org/opends/server/protocols/http/HTTPConnectionHandler.java
index 725fce2..2da8f45 100644
--- a/opends/src/server/org/opends/server/protocols/http/HTTPConnectionHandler.java
+++ b/opends/src/server/org/opends/server/protocols/http/HTTPConnectionHandler.java
@@ -200,6 +200,17 @@
&& !this.currentConfig.isAuthenticationRequired();
}
+ /**
+ * Registers a client connection to track it.
+ *
+ * @param clientConnection
+ * the client connection to register
+ */
+ void addClientConnection(ClientConnection clientConnection)
+ {
+ clientConnections.put(clientConnection, clientConnection);
+ }
+
/** {@inheritDoc} */
@Override
public ConfigChangeResult applyConfigurationChange(
@@ -347,16 +358,6 @@
return clientConnections.keySet();
}
- /**
- * Gives access to the clientConnections to classes in this package.
- *
- * @return the Map containing the current client connections
- */
- Map<ClientConnection, ClientConnection> getClientConnectionsMap()
- {
- return clientConnections;
- }
-
/** {@inheritDoc} */
@Override
public DN getComponentEntryDN()
@@ -644,6 +645,17 @@
}
}
+ /**
+ * Unregisters a client connection to stop tracking it.
+ *
+ * @param clientConnection
+ * the client connection to unregister
+ */
+ void removeClientConnection(ClientConnection clientConnection)
+ {
+ clientConnections.remove(clientConnection);
+ }
+
/** {@inheritDoc} */
@Override
public void run()
--
Gitblit v1.10.0