From 45690fbc42773415ef034419ed3f27d2974b78e1 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Wed, 21 Nov 2012 23:24:40 +0000
Subject: [PATCH] Fix OPENDJ-649: Add supportedTLSCiphers and supportedTLSProtocols to RootDSE and system monitor
---
opends/src/server/org/opends/server/core/ConnectionHandlerConfigManager.java | 33 ++++++++++++++-------------------
1 files changed, 14 insertions(+), 19 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/ConnectionHandlerConfigManager.java b/opends/src/server/org/opends/server/core/ConnectionHandlerConfigManager.java
index 4bd7ef7..0bd01b0 100644
--- a/opends/src/server/org/opends/server/core/ConnectionHandlerConfigManager.java
+++ b/opends/src/server/org/opends/server/core/ConnectionHandlerConfigManager.java
@@ -23,6 +23,7 @@
*
*
* Copyright 2006-2009 Sun Microsystems, Inc.
+ * Portions copyright 2012 ForgeRock AS.
*/
package org.opends.server.core;
import org.opends.messages.Message;
@@ -39,6 +40,7 @@
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.opends.server.admin.AdministrationConnector;
@@ -80,8 +82,8 @@
// The mapping between configuration entry DNs and their
// corresponding connection handler implementations.
- private ConcurrentHashMap<DN, ConnectionHandler> connectionHandlers =
- new ConcurrentHashMap<DN, ConnectionHandler>();
+ private final Map<DN, ConnectionHandler<?>> connectionHandlers =
+ new ConcurrentHashMap<DN, ConnectionHandler<?>>();
@@ -251,7 +253,7 @@
// deregister and stop it. We'll try to leave any established
// connections alone if possible.
DN dn = configuration.dn();
- ConnectionHandler connectionHandler = connectionHandlers.get(dn);
+ ConnectionHandler<?> connectionHandler = connectionHandlers.get(dn);
if (connectionHandler != null) {
DirectoryServer.deregisterConnectionHandler(connectionHandler);
connectionHandlers.remove(dn);
@@ -280,7 +282,11 @@
*/
public void initializeConnectionHandlerConfig()
throws ConfigException, InitializationException {
- connectionHandlers = new ConcurrentHashMap<DN, ConnectionHandler>();
+ // Clear the set of connection handlers in case of in-core restart.
+ connectionHandlers.clear();
+
+ // Initialize the admin connector.
+ initializeAdministrationConnectorConfig();
// Get the root configuration which acts as the parent of all
// connection handlers.
@@ -325,20 +331,7 @@
- /**
- * Initializes the configuration associated with the Directory
- * Server administration connector. This should only be called at
- * Directory Server startup.
- *
- * @throws ConfigException
- * If a critical configuration problem prevents the
- * administration connector initialization from succeeding.
- * @throws InitializationException
- * If a problem occurs while initializing the administration
- * connector that is not related to the server
- * configuration.
- */
- public void initializeAdministrationConnectorConfig()
+ private void initializeAdministrationConnectorConfig()
throws ConfigException, InitializationException {
RootCfg root =
@@ -417,6 +410,7 @@
.getJavaClassPropertyDefinition();
// Load the class and cast it to a connection handler.
+ @SuppressWarnings("rawtypes")
Class<? extends ConnectionHandler> theClass;
ConnectionHandler<?> connectionHandler;
@@ -475,7 +469,8 @@
.getJavaClassPropertyDefinition();
// Load the class and cast it to a connection handler.
- ConnectionHandler connectionHandler = null;
+ ConnectionHandler<?> connectionHandler = null;
+ @SuppressWarnings("rawtypes")
Class<? extends ConnectionHandler> theClass;
try {
connectionHandler = connectionHandlers.get(config.dn());
--
Gitblit v1.10.0