From 4749634576bb712b6ff2c0351f0042f860a0748f Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 15 Jul 2015 15:14:19 +0000
Subject: [PATCH] Code cleanup
---
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/ControlPanelInfo.java | 268 +++++---------
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/tools/ConfigureWindowsService.java | 13
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/core/DirectoryServer.java | 790 ++-----------------------------------------
3 files changed, 153 insertions(+), 918 deletions(-)
diff --git a/opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/ControlPanelInfo.java b/opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/ControlPanelInfo.java
index 5c25ff5..df3482d 100644
--- a/opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/ControlPanelInfo.java
+++ b/opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/ControlPanelInfo.java
@@ -28,6 +28,7 @@
import static org.opends.admin.ads.util.ConnectionUtils.*;
import static org.opends.guitools.controlpanel.util.Utilities.*;
+import static org.opends.server.tools.ConfigureWindowsService.*;
import static com.forgerock.opendj.cli.Utils.*;
import static com.forgerock.opendj.util.OperatingSystem.*;
@@ -38,6 +39,7 @@
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedHashSet;
+import java.util.Objects;
import java.util.Set;
import java.util.SortedSet;
@@ -52,6 +54,7 @@
import org.opends.admin.ads.util.ConnectionUtils;
import org.opends.guitools.controlpanel.browser.IconPool;
import org.opends.guitools.controlpanel.browser.LDAPConnectionPool;
+import org.opends.guitools.controlpanel.datamodel.ServerDescriptor.ServerStatus;
import org.opends.guitools.controlpanel.event.BackendPopulatedEvent;
import org.opends.guitools.controlpanel.event.BackendPopulatedListener;
import org.opends.guitools.controlpanel.event.BackupCreatedEvent;
@@ -61,13 +64,14 @@
import org.opends.guitools.controlpanel.event.IndexModifiedEvent;
import org.opends.guitools.controlpanel.event.IndexModifiedListener;
import org.opends.guitools.controlpanel.task.Task;
+import org.opends.guitools.controlpanel.task.Task.State;
+import org.opends.guitools.controlpanel.task.Task.Type;
import org.opends.guitools.controlpanel.util.ConfigFromDirContext;
import org.opends.guitools.controlpanel.util.ConfigFromFile;
import org.opends.guitools.controlpanel.util.ConfigReader;
import org.opends.guitools.controlpanel.util.Utilities;
import org.opends.quicksetup.util.UIKeyStore;
import org.opends.quicksetup.util.Utils;
-import org.opends.server.tools.ConfigureWindowsService;
import org.opends.server.util.StaticUtils;
import com.forgerock.opendj.cli.CliConstants;
@@ -76,7 +80,6 @@
* This is the classes that is shared among all the different places in the
* Control Panel. It contains information about the server status and
* configuration and some objects that are shared everywhere.
- *
*/
public class ControlPanelInfo
{
@@ -87,8 +90,8 @@
private InitialLdapContext ctx;
private InitialLdapContext userDataCtx;
private final LDAPConnectionPool connectionPool = new LDAPConnectionPool();
- // Used by the browsers
- private final IconPool iconPool = new IconPool(); // Used by the browsers
+ /** Used by the browsers. */
+ private final IconPool iconPool = new IconPool();
private Thread poolingThread;
private boolean stopPooling;
private boolean pooling;
@@ -235,7 +238,7 @@
if (i.getName().equalsIgnoreCase(index.getName()) &&
i.getBackend().getBackendID().equalsIgnoreCase(
index.getBackend().getBackendID()) &&
- i.getClass().equals((index.getClass())))
+ i.getClass().equals(index.getClass()))
{
toRemove.add(i);
}
@@ -443,10 +446,7 @@
desc.setSchemaEnabled(reader.isSchemaEnabled());
}
- /**
- * Regenerates the last found ServerDescriptor object.
- *
- */
+ /** Regenerates the last found ServerDescriptor object. */
public synchronized void regenerateDescriptor()
{
boolean isLocal = isLocal();
@@ -461,27 +461,19 @@
String installPath = Utilities.getInstallPathFromClasspath();
desc.setInstallPath(installPath);
desc.setInstancePath(Utils.getInstancePathFromInstallPath(installPath));
- boolean windowsServiceEnabled = false;
- if (isWindows())
- {
- windowsServiceEnabled = ConfigureWindowsService.serviceState() == ConfigureWindowsService.SERVICE_STATE_ENABLED;
- }
- desc.setWindowsServiceEnabled(windowsServiceEnabled);
+ desc.setWindowsServiceEnabled(isWindows() && serviceState() == SERVICE_STATE_ENABLED);
}
- else
+ else if (lastRemoteHostName != null)
{
- if (lastRemoteHostName != null)
- {
- desc.setHostname(lastRemoteHostName);
- }
+ desc.setHostname(lastRemoteHostName);
}
ConfigReader reader;
- ServerDescriptor.ServerStatus status = getStatus(desc);
+ ServerStatus status = getStatus(desc);
if (status != null)
{
desc.setStatus(status);
- if (status == ServerDescriptor.ServerStatus.STOPPING)
+ if (status == ServerStatus.STOPPING)
{
StaticUtils.close(ctx);
this.ctx = null;
@@ -506,9 +498,9 @@
else if (!isLocal ||
Utilities.isServerRunning(new File(desc.getInstancePath())))
{
- desc.setStatus(ServerDescriptor.ServerStatus.STARTED);
+ desc.setStatus(ServerStatus.STARTED);
- if ((ctx == null) && (lastWorkingBindDN != null))
+ if (ctx == null && lastWorkingBindDN != null)
{
// Try with previous credentials.
try
@@ -537,46 +529,44 @@
}
}
- if (isLocal && (ctx == null))
+ if (isLocal && ctx == null)
{
reader = createNewConfigFromFileReader();
((ConfigFromFile)reader).readConfiguration();
}
+ else if (!isLocal && ctx == null)
+ {
+ desc.setStatus(ServerStatus.NOT_CONNECTED_TO_REMOTE);
+ reader = null;
+ }
else
{
- if (!isLocal && (ctx == null))
- {
- desc.setStatus(ServerDescriptor.ServerStatus.NOT_CONNECTED_TO_REMOTE);
- reader = null;
- }
- else
- {
- Utilities.initializeLegacyConfigurationFramework();
- reader = createNewConfigFromDirContextReader();
- ((ConfigFromDirContext)reader).readConfiguration(ctx);
+ Utilities.initializeLegacyConfigurationFramework();
+ reader = createNewConfigFromDirContextReader();
+ ((ConfigFromDirContext) reader).readConfiguration(ctx);
- boolean connectionWorks = checkConnections(ctx, userDataCtx);
- if (!connectionWorks)
+ boolean connectionWorks = checkConnections(ctx, userDataCtx);
+ if (!connectionWorks)
+ {
+ if (isLocal)
{
- if (isLocal)
- {
- // Try with off-line info
- reader = createNewConfigFromFileReader();
- ((ConfigFromFile)reader).readConfiguration();
- }
- else
- {
- desc.setStatus(ServerDescriptor.ServerStatus.NOT_CONNECTED_TO_REMOTE);
- reader = null;
- }
- StaticUtils.close(ctx);
- this.ctx = null;
- unregisterConnection(connectionPool, ctx);
- StaticUtils.close(userDataCtx);
- userDataCtx = null;
+ // Try with off-line info
+ reader = createNewConfigFromFileReader();
+ ((ConfigFromFile) reader).readConfiguration();
}
+ else
+ {
+ desc.setStatus(ServerStatus.NOT_CONNECTED_TO_REMOTE);
+ reader = null;
+ }
+ StaticUtils.close(ctx);
+ this.ctx = null;
+ unregisterConnection(connectionPool, ctx);
+ StaticUtils.close(userDataCtx);
+ userDataCtx = null;
}
}
+
if (reader != null)
{
desc.setAuthenticated(reader instanceof ConfigFromDirContext);
@@ -607,7 +597,7 @@
}
else
{
- desc.setStatus(ServerDescriptor.ServerStatus.STOPPED);
+ desc.setStatus(ServerStatus.STOPPED);
desc.setAuthenticated(false);
reader = createNewConfigFromFileReader();
((ConfigFromFile)reader).readConfiguration();
@@ -617,7 +607,7 @@
updateServerDescriptor(reader, desc);
}
- if ((serverDesc == null) || !serverDesc.equals(desc))
+ if (serverDesc == null || !serverDesc.equals(desc))
{
serverDesc = desc;
ldapURL = getURL(serverDesc, ConnectionHandlerDescriptor.Protocol.LDAP);
@@ -637,22 +627,21 @@
}
}
- private ServerDescriptor.ServerStatus getStatus(ServerDescriptor desc)
+ private ServerStatus getStatus(ServerDescriptor desc)
{
- ServerDescriptor.ServerStatus status = null;
+ ServerStatus status = null;
for (Task task : getTasks())
{
- if ((task.getType() == Task.Type.START_SERVER) &&
- (task.getState() == Task.State.RUNNING) &&
- isRunningOnServer(desc, task))
+ if (task.getType() == Type.START_SERVER
+ && task.getState() == State.RUNNING
+ && isRunningOnServer(desc, task))
{
- status = ServerDescriptor.ServerStatus.STARTING;
+ status = ServerStatus.STARTING;
}
- else if ((task.getType() == Task.Type.STOP_SERVER) &&
- (task.getState() == Task.State.RUNNING) &&
- isRunningOnServer(desc, task))
+ else if (task.getType() == Type.STOP_SERVER && task.getState() == State.RUNNING
+ && isRunningOnServer(desc, task))
{
- status = ServerDescriptor.ServerStatus.STOPPING;
+ status = ServerStatus.STOPPING;
}
}
return status;
@@ -793,12 +782,11 @@
/**
* Stops pooling the server. This method is synchronous, it does not return
* until the pooling is actually stopped.
- *
*/
public synchronized void stopPooling()
{
stopPooling = true;
- while ((poolingThread != null) && pooling)
+ while (poolingThread != null && pooling)
{
try
{
@@ -956,8 +944,8 @@
String url = null;
for (ConnectionHandlerDescriptor desc : server.getConnectionHandlers())
{
- if ((desc.getState() == ConnectionHandlerDescriptor.State.ENABLED) &&
- (desc.getProtocol() == protocol))
+ if (desc.getState() == ConnectionHandlerDescriptor.State.ENABLED
+ && desc.getProtocol() == protocol)
{
int port = desc.getPort();
if (port > 0)
@@ -1016,8 +1004,8 @@
if (desc != null)
{
int port = desc.getPort();
- SortedSet<InetAddress> addresses = desc.getAddresses();
if (port > 0) {
+ SortedSet<InetAddress> addresses = desc.getAddresses();
if (!addresses.isEmpty())
{
String hostAddr = addresses.first().getHostAddress();
@@ -1039,12 +1027,11 @@
*/
public boolean connectUsingStartTLS()
{
- boolean connectUsingStartTLS = false;
if (getStartTLSURL() != null)
{
- connectUsingStartTLS = getStartTLSURL().equals(getURLToConnect());
+ return getStartTLSURL().equals(getURLToConnect());
}
- return connectUsingStartTLS;
+ return false;
}
/**
@@ -1054,12 +1041,11 @@
*/
public boolean connectUsingLDAPS()
{
- boolean connectUsingLDAPS = false;
if (getLDAPSURL() != null)
{
- connectUsingLDAPS = getLDAPSURL().equals(getURLToConnect());
+ return getLDAPSURL().equals(getURLToConnect());
}
- return connectUsingLDAPS;
+ return false;
}
/**
@@ -1074,17 +1060,13 @@
switch (getConnectionPolicy())
{
case USE_STARTTLS:
- url = getStartTLSURL();
- break;
+ return getStartTLSURL();
case USE_LDAP:
- url = getLDAPURL();
- break;
+ return getLDAPURL();
case USE_LDAPS:
- url = getLDAPSURL();
- break;
+ return getLDAPSURL();
case USE_ADMIN:
- url = getAdminConnectorURL();
- break;
+ return getAdminConnectorURL();
case USE_MOST_SECURE_AVAILABLE:
url = getLDAPSURL();
if (url == null)
@@ -1095,7 +1077,7 @@
{
url = getLDAPURL();
}
- break;
+ return url;
case USE_LESS_SECURE_AVAILABLE:
url = getLDAPURL();
if (url == null)
@@ -1106,11 +1088,10 @@
{
url = getLDAPSURL();
}
- break;
+ return url;
default:
throw new RuntimeException("Unknown policy: "+getConnectionPolicy());
}
- return url;
}
/**
@@ -1193,9 +1174,7 @@
this.poolingPeriod = poolingPeriod;
}
- /**
- * Cleans the tasks that are over.
- */
+ /** Cleans the tasks that are over. */
private void cleanupTasks()
{
Set<Task> toClean = new HashSet<>();
@@ -1225,84 +1204,50 @@
*/
private boolean isRunningOnServer(ServerDescriptor server, Task task)
{
- boolean isRunningOnServer;
- if (!server.isLocal() || !task.getServer().isLocal())
+ if (server.isLocal() && task.getServer().isLocal())
{
- if (!server.isLocal())
- {
- // At this point we only have connection information about the new
- // server. Use the dir context which corresponds to the server to
- // compare things.
- String host1 = server.getHostname();
- String host2 = task.getServer().getHostname();
- if (host1 == null)
- {
- isRunningOnServer = host2 == null;
- }
- else
- {
- isRunningOnServer = host1.equalsIgnoreCase(host2);
- }
- if (isRunningOnServer)
- {
- // Compare administration port;
- int adminPort1 = -1;
- int adminPort2 = -1;
- if (server.getAdminConnector() != null)
- {
- adminPort1 = server.getAdminConnector().getPort();
- }
-
- if (getDirContext() != null)
- {
- adminPort2 = ConnectionUtils.getPort(getDirContext());
- }
- isRunningOnServer = adminPort1 == adminPort2;
- }
- }
- else
- {
- // Compare host names and paths
- String f1 = server.getInstancePath();
- String f2 = task.getServer().getInstancePath();
-
- String host1 = server.getHostname();
- String host2 = task.getServer().getHostname();
- if (host1 == null)
- {
- isRunningOnServer = host2 == null;
- }
- else
- {
- isRunningOnServer = host1.equalsIgnoreCase(host2);
- }
- if (isRunningOnServer)
- {
- if (f1 == null)
- {
- isRunningOnServer = f2 == null;
- }
- else
- {
- isRunningOnServer = f1.equals(f2);
- }
- }
- }
+ return true;
}
- else
+
+ String host1 = server.getHostname();
+ String host2 = task.getServer().getHostname();
+ boolean isRunningOnServer = host1 != null ? host1.equalsIgnoreCase(host2) : host2 == null;
+ if (!isRunningOnServer)
{
- isRunningOnServer = true;
+ return false;
}
- return isRunningOnServer;
+
+ if (server.isLocal())
+ {
+ // Compare paths
+ String path1 = server.getInstancePath();
+ String path2 = task.getServer().getInstancePath();
+ return Objects.equals(path1, path2);
+ }
+
+ // At this point we only have connection information about the new server.
+ // Use the dir context which corresponds to the server to compare things.
+
+ // Compare administration port;
+ int adminPort1 = -1;
+ int adminPort2 = -1;
+ if (server.getAdminConnector() != null)
+ {
+ adminPort1 = server.getAdminConnector().getPort();
+ }
+
+ if (getDirContext() != null)
+ {
+ adminPort2 = ConnectionUtils.getPort(getDirContext());
+ }
+ return adminPort1 == adminPort2;
}
- private boolean checkConnections(InitialLdapContext ctx,
- InitialLdapContext userCtx)
+ private boolean checkConnections(InitialLdapContext ctx, InitialLdapContext userCtx)
{
// Check the connection
- boolean connectionWorks = false;
int nMaxErrors = 5;
- for (int i=0; i< nMaxErrors && !connectionWorks; i++)
+ for (int i=0; i< nMaxErrors; i++)
{
try
{
@@ -1311,7 +1256,7 @@
{
Utilities.pingDirContext(userCtx);
}
- connectionWorks = true;
+ return true;
}
catch (NamingException ne)
{
@@ -1324,7 +1269,7 @@
}
}
}
- return connectionWorks;
+ return false;
}
/**
@@ -1347,5 +1292,4 @@
}
}
}
-
}
diff --git a/opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/core/DirectoryServer.java b/opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/core/DirectoryServer.java
index 235a8e3..8a6c5ed 100644
--- a/opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/core/DirectoryServer.java
+++ b/opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/core/DirectoryServer.java
@@ -31,6 +31,7 @@
import static org.opends.messages.ToolMessages.*;
import static org.opends.server.config.ConfigConstants.*;
import static org.opends.server.schema.SchemaConstants.*;
+import static org.opends.server.tools.ConfigureWindowsService.*;
import static org.opends.server.util.CollectionUtils.*;
import static org.opends.server.util.DynamicConstants.*;
import static org.opends.server.util.ServerConstants.*;
@@ -174,7 +175,6 @@
import org.opends.server.schema.SchemaUpdater;
import org.opends.server.schema.TelephoneNumberEqualityMatchingRuleFactory;
import org.opends.server.schema.TelephoneNumberSubstringMatchingRuleFactory;
-import org.opends.server.tools.ConfigureWindowsService;
import org.opends.server.types.AcceptRejectWarn;
import org.opends.server.types.AttributeType;
import org.opends.server.types.BackupConfig;
@@ -234,17 +234,10 @@
/** The singleton Directory Server instance. */
private static DirectoryServer directoryServer = new DirectoryServer();
-
- /**
- * Indicates whether the server currently holds an exclusive lock on the
- * server lock file.
- */
+ /** Indicates whether the server currently holds an exclusive lock on the server lock file. */
private static boolean serverLocked;
- /**
- * The message to be displayed on the command-line when the user asks for the
- * usage.
- */
+ /** The message to be displayed on the command-line when the user asks for the usage. */
private static LocalizableMessage toolDescription = INFO_DSCORE_TOOL_DESCRIPTION.get();
/**
@@ -271,20 +264,11 @@
private static final int START_AS_NON_DETACH = 100;
/** The server must be started as a window service. */
private static final int START_AS_WINDOWS_SERVICE = 101;
- /**
- * The server must be started as detached and it is being called from the
- * Windows Service.
- */
+ /** The server must be started as detached and it is being called from the Windows Service. */
private static final int START_AS_DETACH_CALLED_FROM_WINDOWS_SERVICE = 102;
- /**
- * The server must be started as detached process and should not produce any
- * output.
- */
+ /** The server must be started as detached process and should not produce any output. */
private static final int START_AS_DETACH_QUIET = 103;
- /**
- * The server must be started as non-detached process and should not produce
- * any output.
- */
+ /** The server must be started as non-detached process and should not produce any output. */
private static final int START_AS_NON_DETACH_QUIET = 104;
/** Temporary context object, to provide instance methods instead of static methods. */
@@ -330,16 +314,10 @@
*/
private boolean allowAttributeNameExceptions;
- /**
- * Indicates whether a simple bind request containing a DN must also provide a
- * password.
- */
+ /** Indicates whether a simple bind request containing a DN must also provide a password. */
private boolean bindWithDNRequiresPassword;
- /**
- * Indicates whether the Directory Server should perform schema checking for
- * update operations.
- */
+ /** Indicates whether the Directory Server should perform schema checking for update operations. */
private boolean checkSchema;
/** Indicates whether the server has been bootstrapped. */
@@ -349,29 +327,19 @@
/** Indicates whether the server is currently in "lockdown mode". */
private boolean lockdownMode;
- /**
- * Indicates whether the server should send a response to operations that have
- * been abandoned.
- */
+ /** Indicates whether the server should send a response to operations that have been abandoned. */
private boolean notifyAbandonedOperations;
- /**
- * Indicates whether to save a copy of the configuration on successful
- * startup.
- */
+ /** Indicates whether to save a copy of the configuration on successful startup. */
private boolean saveConfigOnSuccessfulStartup;
- /**
- * Indicates whether the server is currently in the process of shutting down.
- */
+ /** Indicates whether the server is currently in the process of shutting down. */
private boolean shuttingDown;
/** Indicates whether the server should reject unauthenticated requests. */
private boolean rejectUnauthenticatedRequests;
- /**
- * Indicates whether bind responses should include failure reason messages.
- */
+ /** Indicates whether bind responses should include failure reason messages. */
private boolean returnBindErrorMessages;
/** The configuration manager that will handle the certificate mapper. */
@@ -521,25 +489,12 @@
private List<InitializationCompletedListener>
initializationCompletedListeners;
- /**
- * The set of shutdown listeners that have been registered with the Directory
- * Server.
- */
+ /** The set of shutdown listeners that have been registered with the Directory Server. */
private List<ServerShutdownListener> shutdownListeners;
-
- /**
- * The set of synchronization providers that have been registered with the
- * Directory Server.
- */
- private List<SynchronizationProvider<SynchronizationProviderCfg>>
- synchronizationProviders;
-
- /**
- * The set of backend initialization listeners registered with the Directory
- * Server.
- */
- private Set<BackendInitializationListener>
- backendInitializationListeners;
+ /** The set of synchronization providers that have been registered with the Directory Server. */
+ private List<SynchronizationProvider<SynchronizationProviderCfg>> synchronizationProviders;
+ /** The set of backend initialization listeners registered with the Directory Server. */
+ private Set<BackendInitializationListener> backendInitializationListeners;
/** The set of root DNs registered with the Directory Server. */
private Set<DN> rootDNs;
@@ -606,11 +561,7 @@
* unless overridden on a per-user basis.
*/
private int timeLimit;
-
- /**
- * The maximum number of candidates that should be check for matches during a
- * search.
- */
+ /** The maximum number of candidates that should be check for matches during a search. */
private int lookthroughLimit;
/** The current active persistent searches. */
@@ -619,14 +570,10 @@
/** The maximum number of concurrent persistent searches. */
private int maxPSearches;
- /**
- * Whether to use collect operation processing times in nanosecond resolution.
- */
+ /** Whether to use collect operation processing times in nanosecond resolution. */
private boolean useNanoTime;
- /**
- * The key manager provider configuration manager for the Directory Server.
- */
+ /** The key manager provider configuration manager for the Directory Server. */
private KeyManagerProviderConfigManager keyManagerProviderConfigManager;
/** The set of connections that are currently established. */
@@ -652,15 +599,11 @@
/** The number of connections currently established to the server. */
private long currentConnections;
-
/** The idle time limit for the server. */
private long idleTimeLimit;
- /**
- * The maximum number of connections that will be allowed at any given time.
- */
+ /** The maximum number of connections that will be allowed at any given time. */
private long maxAllowedConnections;
-
/** The maximum number of connections established at one time. */
private long maxConnections;
@@ -681,16 +624,12 @@
/** The configuration handler used to manage the password generators. */
private PasswordGeneratorConfigManager passwordGeneratorConfigManager;
-
/** The default password policy for the Directory Server. */
private PasswordPolicy defaultPasswordPolicy;
-
/** The configuration handler used to manage the authentication policies. */
private PasswordPolicyConfigManager authenticationPolicyConfigManager;
-
/** The configuration handler used to manage the password storage schemes. */
private PasswordStorageSchemeConfigManager storageSchemeConfigManager;
-
/** The configuration handler used to manage the password validators. */
private PasswordValidatorConfigManager passwordValidatorConfigManager;
@@ -702,7 +641,6 @@
/** The special backend used for the Directory Server root DSE. */
private RootDSEBackend rootDSEBackend;
-
/** The root DN config manager for the server. */
private RootDNConfigManager rootDNConfigManager;
@@ -737,17 +675,12 @@
/** The time that the server was started, formatted in UTC time. */
private String startTimeUTC;
- /**
- * The synchronization provider configuration manager for the Directory
- * Server.
- */
- private SynchronizationProviderConfigManager
- synchronizationProviderConfigManager;
+ /** The synchronization provider configuration manager for the Directory Server. */
+ private SynchronizationProviderConfigManager synchronizationProviderConfigManager;
/** Registry for base DN and naming context information. */
private BaseDnRegistry baseDnRegistry;
-
/** The set of backends registered with the server. */
private TreeMap<String, Backend<?>> backends;
@@ -790,32 +723,25 @@
/** The writability mode for the Directory Server. */
private WritabilityMode writabilityMode;
- /** The memory reservation system */
+ /** The memory reservation system. */
private MemoryQuota memoryQuota;
- /** The Disk Space Monitor */
+ /** The Disk Space Monitor. */
private DiskSpaceMonitor diskSpaceMonitor;
- /** The lock manager which will be used for coordinating access to LDAP entries */
+ /** The lock manager which will be used for coordinating access to LDAP entries. */
private final LockManager lockManager = new LockManager();
- /**
- * The maximum size that internal buffers will be allowed to grow to until
- * they are trimmed.
- */
+ /** The maximum size that internal buffers will be allowed to grow to until they are trimmed. */
private int maxInternalBufferSize = DEFAULT_MAX_INTERNAL_BUFFER_SIZE;
- /**
- * The default timeout used to start the server in detach mode.
- */
+ /** The default timeout used to start the server in detach mode. */
public static final int DEFAULT_TIMEOUT = 200;
/** Entry point for server configuration. */
private org.forgerock.opendj.config.server.ServerManagementContext serverManagementContext;
- /**
- * Class that prints the version of OpenDJ server to System.out.
- */
+ /** Class that prints the version of OpenDJ server to System.out. */
public static final class DirectoryServerVersionHandler implements VersionHandler
{
/** {@inheritDoc} */
@@ -915,7 +841,6 @@
}
}
-
/**
* Creates a new instance of the Directory Server. This will allow only a
* single instance of the server per JVM.
@@ -948,8 +873,6 @@
diskSpaceMonitor = new DiskSpaceMonitor();
}
-
-
/**
* Retrieves the instance of the Directory Server that is associated with this
* JVM.
@@ -962,8 +885,6 @@
return directoryServer;
}
-
-
/**
* Creates a new instance of the Directory Server and replaces the static
* reference to it. This should only be used in the context of an in-core
@@ -983,8 +904,6 @@
}
}
-
-
/**
* Retrieves the environment configuration for the Directory Server.
*
@@ -995,8 +914,6 @@
return directoryServer.environmentConfig;
}
-
-
/**
* Sets the environment configuration for the Directory Server. This method
* may only be invoked when the server is not running.
@@ -1038,8 +955,6 @@
return directoryServer.isRunning;
}
-
-
/**
* Bootstraps the appropriate Directory Server structures that may be needed
* by both server and client-side tools.
@@ -1053,7 +968,6 @@
// processing.
directoryServer.syntaxEnforcementPolicy = AcceptRejectWarn.REJECT;
-
// Create the server schema and initialize and register a minimal set of
// matching rules and attribute syntaxes.
directoryServer.schema = new Schema();
@@ -1061,7 +975,6 @@
directoryServer.bootstrapMatchingRules();
directoryServer.bootstrapAttributeSyntaxes();
-
// Perform any additional initialization that might be necessary before
// loading the configuration.
directoryServer.alertHandlers = new CopyOnWriteArrayList<>();
@@ -1105,8 +1018,6 @@
}
}
-
-
/**
* Bootstraps the Directory Server by initializing all the necessary
* structures that should be in place before the configuration may be read.
@@ -1134,47 +1045,37 @@
shuttingDown = false;
}
-
// Add a shutdown hook so that the server can be notified when the JVM
// starts shutting down.
shutdownHook = new DirectoryServerShutdownHook();
Runtime.getRuntime().addShutdownHook(shutdownHook);
-
// Create the MBean server that we will use for JMX interaction.
initializeJMX();
-
logger.debug(INFO_DIRECTORY_BOOTSTRAPPING);
-
- // Perform all the bootstrapping that is shared with the client-side
- // processing.
+ // Perform all the bootstrapping that is shared with the client-side processing.
bootstrapClient();
-
// Initialize the variables that will be used for connection tracking.
establishedConnections = new LinkedHashSet<>(1000);
currentConnections = 0;
maxConnections = 0;
totalConnections = 0;
-
// Create the plugin config manager, but don't initialize it yet. This will
// make it possible to process internal operations before the plugins have
// been loaded.
pluginConfigManager = new PluginConfigManager(serverContext);
- // If we have gotten here, then the configuration should be properly
- // bootstrapped.
+ // If we have gotten here, then the configuration should be properly bootstrapped.
synchronized (directoryServer)
{
isBootstrapped = true;
}
}
-
-
/**
* Performs a minimal set of JMX initialization. This may be used by the core
* Directory Server or by command-line tools.
@@ -1213,8 +1114,6 @@
}
}
-
-
/**
* Instantiates the configuration handler and loads the Directory Server
* configuration.
@@ -1277,9 +1176,7 @@
//configBackend.initializeConfigBackend(serverContext, configurationHandler);
}
- /**
- * Initialize the schema of this server.
- */
+ /** Initialize the schema of this server. */
@ActivateOnceSDKSchemaIsUsed
private void initializeSchemaNG() throws InitializationException
{
@@ -1330,9 +1227,6 @@
throw new InitializationException(message, e);
}
-
-
-
// Perform the handler-specific initialization.
try
{
@@ -1364,8 +1258,6 @@
}
}
-
-
/**
* Retrieves the path to the configuration file used to initialize the
* Directory Server.
@@ -1378,8 +1270,6 @@
return directoryServer.configFile.getAbsolutePath();
}
-
-
/**
* Starts up the Directory Server. It must have already been bootstrapped
* and cannot be running.
@@ -1420,7 +1310,6 @@
throw new InitializationException(message);
}
-
logger.info(NOTE_DIRECTORY_SERVER_STARTING, getVersionString(), BUILD_ID, REVISION_NUMBER);
// Acquire an exclusive lock for the Directory Server process.
@@ -1588,7 +1477,6 @@
new IdleTimeLimitThread().start();
}
-
// Synchronization of ADS with the crypto manager.
new CryptoManagerSync();
@@ -1695,8 +1583,6 @@
}
}
-
-
/**
* Registers a basic set of attribute syntaxes with the server that should
* always be available regardless of the server configuration and may be
@@ -1750,8 +1636,6 @@
return directoryServer.authenticatedUsers;
}
-
-
/**
* Initializes the crypto manager for the Directory Server.
*
@@ -1771,8 +1655,6 @@
cryptoManager = new CryptoManagerImpl(serverContext, cryptoManagerCfg);
}
-
-
/**
* Retrieves a reference to the Directory Server crypto manager.
*
@@ -1783,8 +1665,6 @@
return directoryServer.cryptoManager;
}
-
-
/**
* Indicates whether the Directory Server is configured with information about
* one or more mail servers and may therefore be used to send e-mail messages.
@@ -1798,8 +1678,6 @@
&& !directoryServer.mailServerPropertySets.isEmpty();
}
-
-
/**
* Specifies the set of mail server properties that should be used for SMTP
* communication.
@@ -1814,8 +1692,6 @@
directoryServer.mailServerPropertySets = mailServerPropertySets;
}
-
-
/**
* Retrieves the sets of information about the mail servers configured for use
* by the Directory Server.
@@ -1828,8 +1704,6 @@
return directoryServer.mailServerPropertySets;
}
-
-
/**
* Initializes the schema elements for the Directory Server, including the
* matching rules, attribute syntaxes, attribute types, and object classes.
@@ -1897,7 +1771,6 @@
configClass, configFile, e.getLocalizedMessage()));
}
-
// Re-register all of the change listeners with the configuration.
for (String dnStr : addListeners.keySet())
{
@@ -1951,8 +1824,6 @@
}
}
-
-
/**
* Retrieves the default compressed schema manager for the Directory Server.
*
@@ -1963,8 +1834,6 @@
return directoryServer.compressedSchema;
}
-
-
/**
* Gets all of the add, delete, and change listeners from the provided
* configuration entry and all of its descendants and puts them in the
@@ -2016,8 +1885,6 @@
return directoryServer.backendInitializationListeners;
}
-
-
/**
* Registers the provided backend initialization listener with the Directory
* Server.
@@ -2031,8 +1898,6 @@
directoryServer.backendInitializationListeners.add(listener);
}
-
-
/**
* Deregisters the provided backend initialization listener with the Directory
* Server.
@@ -2046,8 +1911,6 @@
directoryServer.backendInitializationListeners.remove(listener);
}
-
-
/**
* Initializes the set of backends defined in the Directory Server.
*
@@ -2063,7 +1926,6 @@
backendConfigManager = new BackendConfigManager(serverContext);
backendConfigManager.initializeBackendConfig();
-
// Make sure to initialize the root DSE backend separately after all other
// backends.
RootDSEBackendCfg rootDSECfg;
@@ -2084,7 +1946,6 @@
rootDSEBackend.openBackend();
}
-
/**
* Creates a set of workflows for a given backend and registers the
* workflows with the default network group, the internal network group
@@ -2146,7 +2007,6 @@
}
}
-
/**
* Initializes the Directory Server group manager.
*
@@ -2180,8 +2040,6 @@
// groupManager.performBackendInitializationProcessing(configHandler);
}
-
-
/**
* Retrieves the Directory Server group manager.
*
@@ -2192,8 +2050,6 @@
return directoryServer.groupManager;
}
-
-
/**
* Retrieves the Directory Server subentry manager.
*
@@ -2204,8 +2060,6 @@
return directoryServer.subentryManager;
}
-
-
/**
* Initializes the set of extended operation handlers for the Directory
* Server.
@@ -2224,8 +2078,6 @@
extendedOperationConfigManager.initializeExtendedOperationHandlers();
}
-
-
/**
* Initializes the set of SASL mechanism handlers for the Directory Server.
*
@@ -2243,8 +2095,6 @@
saslConfigManager.initializeSASLMechanismHandlers();
}
-
-
/**
* Initializes the set of connection handlers that should be defined in the
* Directory Server.
@@ -2265,8 +2115,6 @@
connectionHandlerConfigManager.initializeConnectionHandlerConfig();
}
-
-
/**
* Initializes the subentry manager for the Directory Server.
* Note that the subentry manager initialization should be
@@ -2327,8 +2175,6 @@
authenticationPolicyConfigManager.initializeAuthenticationPolicies();
}
-
-
/**
* Retrieves the operating system on which the Directory Server is running.
*
@@ -2339,8 +2185,6 @@
return directoryServer.operatingSystem;
}
-
-
/**
* Retrieves a reference to the Directory Server configuration handler.
*
@@ -2351,8 +2195,6 @@
return directoryServer.configHandler;
}
-
-
/**
* Initializes the set of plugins defined in the Directory Server. Only the
* specified types of plugins will be initialized.
@@ -2375,8 +2217,6 @@
pluginConfigManager.initializeUserPlugins(pluginTypes);
}
-
-
/**
* Initializes the root DN Config Manager in the Directory Server.
*
@@ -2390,8 +2230,6 @@
rootDNConfigManager.initializeRootDNs();
}
-
-
/**
* Initialize the root DSE in the Directory Server.
*
@@ -2418,8 +2256,6 @@
rootDSEBackend.openBackend();
}
-
-
/**
* Retrieves a reference to the Directory Server plugin configuration manager.
*
@@ -2430,8 +2266,6 @@
return directoryServer.pluginConfigManager;
}
-
-
/**
* Registers the provided internal plugin with the Directory Server
* and ensures that it will be invoked in the specified ways.
@@ -2447,8 +2281,6 @@
directoryServer.pluginConfigManager.registerInternalPlugin(plugin);
}
-
-
/**
* Deregisters the provided internal plugin with the Directory Server.
*
@@ -2461,8 +2293,6 @@
directoryServer.pluginConfigManager.deregisterInternalPlugin(plugin);
}
-
-
/**
* Retrieves the requested entry from the Directory Server configuration.
*
@@ -2479,8 +2309,6 @@
return directoryServer.configHandler.getConfigEntry(entryDN);
}
-
-
/**
* Retrieves the path to the root directory for this instance of the Directory
* Server.
@@ -2517,8 +2345,6 @@
return directoryServer.startUpTime;
}
-
-
/**
* Retrieves the time that the Directory Server was started, formatted in UTC.
*
@@ -2529,8 +2355,6 @@
return directoryServer.startTimeUTC;
}
-
-
/**
* Retrieves a reference to the Directory Server schema.
*
@@ -2541,8 +2365,6 @@
return directoryServer.schema;
}
-
-
/**
* Replaces the Directory Server schema with the provided schema.
*
@@ -2553,8 +2375,6 @@
directoryServer.schema = schema;
}
-
-
/**
* Retrieves a list of modifications detailing any schema changes that may
* have been made with the server offline (e.g., by directly editing the
@@ -2571,8 +2391,6 @@
return directoryServer.offlineSchemaChanges;
}
-
-
/**
* Specifies a list of modifications detailing any schema changes that may
* have been made with the server offline.
@@ -2589,8 +2407,6 @@
directoryServer.offlineSchemaChanges = offlineSchemaChanges;
}
-
-
/**
* Retrieves the set of matching rules registered with the Directory Server.
* The mapping will be between the lowercase name or OID for each matching
@@ -2604,8 +2420,6 @@
return directoryServer.schema.getMatchingRules();
}
-
-
/**
* Retrieves the matching rule with the specified name or OID.
*
@@ -2620,8 +2434,6 @@
return directoryServer.schema.getMatchingRule(lowerName);
}
-
-
/**
* Registers the provided matching rule with the Directory Server.
*
@@ -2663,8 +2475,6 @@
return directoryServer.schema.getObjectClasses();
}
-
-
/**
* Retrieves the objectclass for the provided lowercase name or OID.
*
@@ -2679,8 +2489,6 @@
return directoryServer.schema.getObjectClass(lowerName);
}
-
-
/**
* Retrieves the objectclass for the provided lowercase name or OID. It can
* optionally return a generated "default" version if the requested
@@ -2708,8 +2516,6 @@
return oc;
}
-
-
/**
* Registers the provided objectclass with the Directory Server.
*
@@ -2731,8 +2537,6 @@
directoryServer.schema.registerObjectClass(objectClass, overwriteExisting);
}
-
-
/**
* Deregisters the provided objectclass with the Directory Server.
*
@@ -2744,8 +2548,6 @@
directoryServer.schema.deregisterObjectClass(objectClass);
}
-
-
/**
* Retrieves the "top" objectClass, which should be the topmost objectclass in
* the inheritance chain for most other objectclasses. If no such objectclass
@@ -2774,8 +2576,6 @@
return objectClass;
}
-
-
/**
* Causes the Directory Server to construct a new objectclass
* definition with the provided name and with no required or allowed
@@ -2807,8 +2607,6 @@
return objectClass;
}
-
-
/**
* Causes the Directory Server to construct a new auxiliary objectclass
* definition with the provided name and with no required or allowed
@@ -2839,8 +2637,6 @@
return objectClass;
}
-
-
/**
* Retrieves the set of attribute type definitions that have been
* defined in the Directory Server.
@@ -2853,8 +2649,6 @@
return directoryServer.schema.getAttributeTypes();
}
-
-
/**
* Retrieves the attribute type for the provided lowercase name or OID.
*
@@ -2869,8 +2663,6 @@
return directoryServer.schema.getAttributeType(lowerName);
}
-
-
/**
* Retrieves the attribute type for the provided lowercase name or OID. It
* can optionally return a generated "default" version if the requested
@@ -2936,8 +2728,6 @@
overwriteExisting);
}
-
-
/**
* Deregisters the provided attribute type with the Directory Server.
*
@@ -2949,8 +2739,6 @@
directoryServer.schema.deregisterAttributeType(attributeType);
}
-
-
/**
* Retrieves the attribute type for the "objectClass" attribute.
*
@@ -3007,8 +2795,6 @@
return directoryServer.objectClassAttributeType;
}
-
-
/**
* Causes the Directory Server to construct a new attribute type definition
* with the provided name and using the default attribute syntax. This should
@@ -3024,8 +2810,6 @@
return getDefaultAttributeType(name, getDefaultAttributeSyntax());
}
-
-
/**
* Causes the Directory Server to construct a new attribute type definition
* with the provided name and syntax. This should only be used if there is no
@@ -3050,8 +2834,6 @@
false, false).setDirty();
}
-
-
/**
* Retrieves the set of attribute syntaxes defined in the Directory Server.
*
@@ -3074,8 +2856,6 @@
return directoryServer.defaultSyntax;
}
-
-
/**
* Retrieves the default attribute syntax that should be used for attributes
* that are not defined in the server schema and are meant to store binary
@@ -3090,8 +2870,6 @@
return directoryServer.defaultBinarySyntax;
}
-
-
/**
* Retrieves the default attribute syntax that should be used for attributes
* that are not defined in the server schema and are meant to store Boolean
@@ -3106,8 +2884,6 @@
return directoryServer.defaultBooleanSyntax;
}
-
-
/**
* Retrieves the default attribute syntax that should be used for attributes
* that are not defined in the server schema and are meant to store DN values.
@@ -3121,8 +2897,6 @@
return directoryServer.defaultDNSyntax;
}
-
-
/**
* Retrieves the default attribute syntax that should be used for attributes
* that are not defined in the server schema and are meant to store integer
@@ -3137,8 +2911,6 @@
return directoryServer.defaultIntegerSyntax;
}
-
-
/**
* Retrieves the default attribute syntax that should be used for attributes
* that are not defined in the server schema and are meant to store string
@@ -3153,8 +2925,6 @@
return directoryServer.defaultStringSyntax;
}
-
-
/**
* Retrieves the set of matching rule uses defined in the Directory Server.
*
@@ -3166,8 +2936,6 @@
return directoryServer.schema.getMatchingRuleUses();
}
-
-
/**
* Retrieves the matching rule use associated with the provided matching rule.
*
@@ -3182,8 +2950,6 @@
return directoryServer.schema.getMatchingRuleUse(matchingRule);
}
-
-
/**
* Registers the provided matching rule use with the Directory Server.
*
@@ -3206,8 +2972,6 @@
overwriteExisting);
}
-
-
/**
* Deregisters the provided matching rule use with the Directory Server.
*
@@ -3219,8 +2983,6 @@
directoryServer.schema.deregisterMatchingRuleUse(matchingRuleUse);
}
-
-
/**
* Retrieves the set of DIT content rules defined in the Directory Server.
*
@@ -3232,8 +2994,6 @@
return directoryServer.schema.getDITContentRules();
}
-
-
/**
* Retrieves the DIT content rule associated with the specified objectclass.
*
@@ -3248,8 +3008,6 @@
return directoryServer.schema.getDITContentRule(objectClass);
}
-
-
/**
* Registers the provided DIT content rule with the Directory Server.
*
@@ -3272,8 +3030,6 @@
overwriteExisting);
}
-
-
/**
* Deregisters the provided DIT content rule with the Directory Server.
*
@@ -3284,8 +3040,6 @@
directoryServer.schema.deregisterDITContentRule(ditContentRule);
}
-
-
/**
* Retrieves the set of DIT structure rules defined in the Directory Server.
*
@@ -3297,8 +3051,6 @@
return directoryServer.schema.getDITStructureRulesByNameForm();
}
-
-
/**
* Retrieves the DIT structure rule associated with the provided rule ID.
*
@@ -3313,8 +3065,6 @@
return directoryServer.schema.getDITStructureRule(ruleID);
}
-
-
/**
* Retrieves the DIT structure rule associated with the provided name form.
*
@@ -3329,8 +3079,6 @@
return directoryServer.schema.getDITStructureRule(nameForm);
}
-
-
/**
* Registers the provided DIT structure rule with the Directory Server.
*
@@ -3353,8 +3101,6 @@
overwriteExisting);
}
-
-
/**
* Deregisters the provided DIT structure rule with the Directory Server.
*
@@ -3367,8 +3113,6 @@
directoryServer.schema.deregisterDITStructureRule(ditStructureRule);
}
-
-
/**
* Retrieves the set of name forms defined in the Directory Server.
*
@@ -3379,8 +3123,6 @@
return directoryServer.schema.getNameFormsByObjectClass();
}
-
-
/**
* Retrieves the name forms associated with the specified objectclass.
*
@@ -3395,8 +3137,6 @@
return directoryServer.schema.getNameForm(objectClass);
}
-
-
/**
* Retrieves the name form associated with the specified name or OID.
*
@@ -3411,8 +3151,6 @@
return directoryServer.schema.getNameForm(lowerName);
}
-
-
/**
* Registers the provided name form with the Directory Server.
*
@@ -3433,8 +3171,6 @@
directoryServer.schema.registerNameForm(nameForm, overwriteExisting);
}
-
-
/**
* Deregisters the provided name form with the Directory Server.
*
@@ -3445,8 +3181,6 @@
directoryServer.schema.deregisterNameForm(nameForm);
}
-
-
/**
* Retrieves the set of virtual attribute rules registered with the Directory
* Server.
@@ -3459,8 +3193,6 @@
return directoryServer.virtualAttributeConfigManager.getVirtualAttributes();
}
-
-
/**
* Retrieves the set of virtual attribute rules registered with the Directory
* Server that are applicable to the provided entry.
@@ -3505,8 +3237,6 @@
getInstance().virtualAttributeConfigManager.deregister(rule);
}
-
-
/**
* Retrieves a reference to the JMX MBean server that is associated with the
* Directory Server.
@@ -3518,8 +3248,6 @@
return directoryServer.mBeanServer;
}
-
-
/**
* Retrieves the set of JMX MBeans that are associated with the server.
*
@@ -3530,8 +3258,6 @@
return directoryServer.mBeans;
}
-
-
/**
* Retrieves the JMX MBean associated with the specified entry in the
* Directory Server configuration.
@@ -3548,8 +3274,6 @@
return directoryServer.mBeans.get(configEntryDN);
}
-
-
/**
* Registers the provided invokable component with the Directory Server.
*
@@ -3571,8 +3295,6 @@
}
}
-
-
/**
* Deregisters the provided invokable component with the Directory Server.
*
@@ -3588,8 +3310,6 @@
}
}
-
-
/**
* Registers the provided alert generator with the Directory Server.
*
@@ -3611,8 +3331,6 @@
}
}
-
-
/**
* Deregisters the provided alert generator with the Directory Server.
*
@@ -3628,8 +3346,6 @@
}
}
-
-
/**
* Retrieves the set of alert handlers that have been registered with the
* Directory Server.
@@ -3642,8 +3358,6 @@
return directoryServer.alertHandlers;
}
-
-
/**
* Registers the provided alert handler with the Directory Server.
*
@@ -3654,8 +3368,6 @@
directoryServer.alertHandlers.add(alertHandler);
}
-
-
/**
* Deregisters the provided alert handler with the Directory Server.
*
@@ -3666,8 +3378,6 @@
directoryServer.alertHandlers.remove(alertHandler);
}
-
-
/**
* Sends an alert notification with the provided information.
*
@@ -3732,13 +3442,10 @@
}
}
-
String alertID = alertMessage != null ? alertMessage.resourceName() + "-" + alertMessage.ordinal() : "-1";
logger.info(NOTE_SENT_ALERT_NOTIFICATION, generator.getClassName(), alertType, alertID, alertMessage);
}
-
-
/**
* Retrieves the password storage scheme defined in the specified
* configuration entry.
@@ -3754,8 +3461,6 @@
return directoryServer.passwordStorageSchemesByDN.get(configEntryDN);
}
-
-
/**
* Retrieves the set of password storage schemes defined in the Directory
* Server, as a mapping between the all-lowercase scheme name and the
@@ -3770,8 +3475,6 @@
return directoryServer.passwordStorageSchemes;
}
-
-
/**
* Retrieves the specified password storage scheme.
*
@@ -3786,8 +3489,6 @@
return directoryServer.passwordStorageSchemes.get(lowerName);
}
-
-
/**
* Retrieves the set of authentication password storage schemes defined in the
* Directory Server, as a mapping between the scheme name and the
@@ -3802,8 +3503,6 @@
return directoryServer.authPasswordStorageSchemes;
}
-
-
/**
* Retrieves the specified authentication password storage scheme.
*
@@ -3818,8 +3517,6 @@
return directoryServer.authPasswordStorageSchemes.get(name);
}
-
-
/**
* Registers the provided password storage scheme with the Directory Server.
* If an existing password storage scheme is registered with the same name,
@@ -3845,8 +3542,6 @@
}
}
-
-
/**
* Deregisters the specified password storage scheme with the Directory
* Server. If no scheme is registered with the specified name, then no action
@@ -3873,8 +3568,6 @@
}
}
-
-
/**
* Retrieves the set of password validators that have been registered for use
* with the Directory Server as a mapping between the DN of the associated
@@ -3890,8 +3583,6 @@
return directoryServer.passwordValidators;
}
-
-
/**
* Retrieves the password validator registered with the provided configuration
* entry DN.
@@ -3908,8 +3599,6 @@
return directoryServer.passwordValidators.get(configEntryDN);
}
-
-
/**
* Registers the provided password validator for use with the Directory
* Server.
@@ -3927,8 +3616,6 @@
directoryServer.passwordValidators.put(configEntryDN, validator);
}
-
-
/**
* Deregisters the provided password validator for use with the Directory
* Server.
@@ -3941,8 +3628,6 @@
directoryServer.passwordValidators.remove(configEntryDN);
}
-
-
/**
* Retrieves the set of account status notification handlers defined in the
* Directory Server, as a mapping between the DN of the configuration entry
@@ -3957,8 +3642,6 @@
return directoryServer.accountStatusNotificationHandlers;
}
-
-
/**
* Retrieves the account status notification handler with the specified
* configuration entry DN.
@@ -3975,8 +3658,6 @@
return directoryServer.accountStatusNotificationHandlers.get(handlerDN);
}
-
-
/**
* Registers the provided account status notification handler with the
* Directory Server.
@@ -3992,8 +3673,6 @@
directoryServer.accountStatusNotificationHandlers.put(handlerDN, handler);
}
-
-
/**
* Deregisters the specified account status notification handler with the
* Directory Server.
@@ -4006,9 +3685,6 @@
directoryServer.accountStatusNotificationHandlers.remove(handlerDN);
}
-
-
-
/**
* Retrieves the set of password generators that have been registered for use
* with the Directory Server as a mapping between the DN of the associated
@@ -4022,8 +3698,6 @@
return directoryServer.passwordGenerators;
}
-
-
/**
* Retrieves the password generator registered with the provided configuration
* entry DN.
@@ -4039,8 +3713,6 @@
return directoryServer.passwordGenerators.get(configEntryDN);
}
-
-
/**
* Registers the provided password generator for use with the Directory
* Server.
@@ -4056,8 +3728,6 @@
directoryServer.passwordGenerators.put(configEntryDN, generator);
}
-
-
/**
* Deregisters the provided password generator for use with the Directory
* Server.
@@ -4070,8 +3740,6 @@
directoryServer.passwordGenerators.remove(configEntryDN);
}
-
-
/**
* Returns an unmodifiable collection containing all of the authentication
* policies registered with the Directory Server. The references returned are
@@ -4087,8 +3755,6 @@
.unmodifiableCollection(directoryServer.authenticationPolicies.values());
}
-
-
/**
* Retrieves the authentication policy registered for the provided
* configuration entry.
@@ -4105,8 +3771,6 @@
return directoryServer.authenticationPolicies.get(configEntryDN);
}
-
-
/**
* Registers the provided authentication policy with the Directory Server. If
* a policy is already registered for the provided configuration entry DN,
@@ -4142,8 +3806,6 @@
}
}
-
-
/**
* Deregisters the provided authentication policy with the Directory Server.
* If no such policy is registered, then no action will be taken.
@@ -4173,8 +3835,6 @@
}
}
-
-
/**
* Retrieves the DN of the configuration entry for the default password policy
* for the Directory Server.
@@ -4190,8 +3850,6 @@
}
}
-
-
/**
* Specifies the DN of the configuration entry for the default authentication
* policy for the Directory Server. This routine does not check the registered
@@ -4213,8 +3871,6 @@
}
}
-
-
/**
* Retrieves the default password policy for the Directory Server. This
* method is equivalent to invoking <CODE>getAuthenticationPolicy</CODE> on
@@ -4249,7 +3905,6 @@
}
}
-
/**
* Retrieves the log rotation policy registered for the provided configuration
* entry.
@@ -4284,8 +3939,6 @@
directoryServer.rotationPolicies.put(configEntryDN, policy);
}
-
-
/**
* Deregisters the provided log rotation policy with the Directory Server.
* If no such policy is registered, then no action will be taken.
@@ -4334,8 +3987,6 @@
directoryServer.retentionPolicies.put(configEntryDN, policy);
}
-
-
/**
* Deregisters the provided log retention policy with the Directory Server.
* If no such policy is registered, then no action will be taken.
@@ -4365,8 +4016,6 @@
return directoryServer.monitorProviders;
}
-
-
/**
* Retrieves the monitor provider with the specified name.
*
@@ -4382,8 +4031,6 @@
return directoryServer.monitorProviders.get(lowerName);
}
-
-
/**
* Registers the provided monitor provider with the Directory Server. Note
* that if a monitor provider is already registered with the specified name,
@@ -4399,7 +4046,6 @@
String lowerName = toLowerCase(monitorProvider.getMonitorInstanceName());
directoryServer.monitorProviders.put(lowerName, monitorProvider);
-
// Try to register this monitor provider with an appropriate JMX MBean.
try
{
@@ -4422,8 +4068,6 @@
}
}
-
-
/**
* Deregisters the specified monitor provider from the Directory Server. If no
* such monitor provider is registered, no action will be taken.
@@ -4457,8 +4101,6 @@
}
}
-
-
/**
* Retrieves the entry cache for the Directory Server.
*
@@ -4469,8 +4111,6 @@
return directoryServer.entryCache;
}
-
-
/**
* Specifies the entry cache that should be used by the Directory Server.
* This should only be called by the entry cache configuration manager.
@@ -4485,8 +4125,6 @@
}
}
-
-
/**
* Retrieves the set of key manager providers registered with the Directory
* Server.
@@ -4499,8 +4137,6 @@
return directoryServer.keyManagerProviders;
}
-
-
/**
* Retrieves the key manager provider registered with the provided entry DN.
*
@@ -4516,8 +4152,6 @@
return directoryServer.keyManagerProviders.get(providerDN);
}
-
-
/**
* Registers the provided key manager provider with the Directory Server.
*
@@ -4530,8 +4164,6 @@
directoryServer.keyManagerProviders.put(providerDN, provider);
}
-
-
/**
* Deregisters the specified key manager provider with the Directory Server.
*
@@ -4543,8 +4175,6 @@
directoryServer.keyManagerProviders.remove(providerDN);
}
-
-
/**
* Retrieves the set of trust manager providers registered with the Directory
* Server.
@@ -4557,8 +4187,6 @@
return directoryServer.trustManagerProviders;
}
-
-
/**
* Retrieves the trust manager provider registered with the provided entry DN.
*
@@ -4574,8 +4202,6 @@
return directoryServer.trustManagerProviders.get(providerDN);
}
-
-
/**
* Registers the provided trust manager provider with the Directory Server.
*
@@ -4589,8 +4215,6 @@
directoryServer.trustManagerProviders.put(providerDN, provider);
}
-
-
/**
* Deregisters the specified trust manager provider with the Directory Server.
*
@@ -4602,8 +4226,6 @@
directoryServer.trustManagerProviders.remove(providerDN);
}
-
-
/**
* Retrieves the set of certificate mappers registered with the Directory
* Server.
@@ -4616,8 +4238,6 @@
return directoryServer.certificateMappers;
}
-
-
/**
* Retrieves the certificate mapper registered with the provided entry DN.
*
@@ -4632,8 +4252,6 @@
return directoryServer.certificateMappers.get(mapperDN);
}
-
-
/**
* Registers the provided certificate mapper with the Directory Server.
*
@@ -4646,8 +4264,6 @@
directoryServer.certificateMappers.put(mapperDN, mapper);
}
-
-
/**
* Deregisters the specified certificate mapper with the Directory Server.
*
@@ -4658,9 +4274,6 @@
directoryServer.certificateMappers.remove(mapperDN);
}
-
-
-
/**
* Retrieves the set of privileges that should automatically be granted to
* root users when they authenticate.
@@ -4673,8 +4286,6 @@
return directoryServer.rootDNConfigManager.getRootPrivileges();
}
-
-
/**
* Retrieves the DNs for the root users configured in the Directory Server.
* Note that this set should only contain the actual DNs for the root users
@@ -4688,8 +4299,6 @@
return directoryServer.rootDNs;
}
-
-
/**
* Indicates whether the provided DN is the DN for one of the root users
* configured in the Directory Server.
@@ -4704,8 +4313,6 @@
return directoryServer.rootDNs.contains(userDN);
}
-
-
/**
* Registers the provided root DN with the Directory Server.
*
@@ -4716,8 +4323,6 @@
directoryServer.rootDNs.add(rootDN);
}
-
-
/**
* Deregisters the provided root DN with the Directory Server. This will have
* no effect if the provided DN is not registered as a root DN.
@@ -4729,8 +4334,6 @@
directoryServer.rootDNs.remove(rootDN);
}
-
-
/**
* Retrieves the set of alternate bind DNs for root users, mapped between the
* alternate DN and the real DN. The contents of the returned map must not be
@@ -4744,8 +4347,6 @@
return directoryServer.alternateRootBindDNs;
}
-
-
/**
* Retrieves the real entry DN for the root user with the provided alternate
* bind DN.
@@ -4761,8 +4362,6 @@
return directoryServer.alternateRootBindDNs.get(alternateRootBindDN);
}
-
-
/**
* Registers an alternate root bind DN using the provided information.
*
@@ -4789,8 +4388,6 @@
}
}
-
-
/**
* Deregisters the provided alternate root bind DN from the server. This will
* have no effect if there was no mapping defined for the provided alternate
@@ -4807,8 +4404,6 @@
return directoryServer.alternateRootBindDNs.remove(alternateRootBindDN);
}
-
-
/**
* Retrieves the result code that should be used when the Directory Server
* encounters an internal server error.
@@ -4821,8 +4416,6 @@
return directoryServer.serverErrorResultCode;
}
-
-
/**
* Specifies the result code that should be used when the Directory Server
* encounters an internal server error.
@@ -4836,8 +4429,6 @@
directoryServer.serverErrorResultCode = serverErrorResultCode;
}
-
-
/**
* Indicates whether the Directory Server should automatically add missing RDN
* attributes to an entry whenever it is added.
@@ -4851,8 +4442,6 @@
return directoryServer.addMissingRDNAttributes;
}
-
-
/**
* Specifies whether the Directory Server should automatically add missing RDN
* attributes to an entry whenever it is added.
@@ -4867,8 +4456,6 @@
directoryServer.addMissingRDNAttributes = addMissingRDNAttributes;
}
-
-
/**
* Indicates whether to be more flexible in the set of characters allowed for
* attribute names. The standard requires that only ASCII alphabetic letters,
@@ -4884,8 +4471,6 @@
return directoryServer.allowAttributeNameExceptions;
}
-
-
/**
* Specifies whether to be more flexible in the set of characters allowed for
* attribute names.
@@ -4900,8 +4485,6 @@
directoryServer.allowAttributeNameExceptions = allowAttributeNameExceptions;
}
-
-
/**
* Indicates whether the Directory Server should perform schema checking.
*
@@ -4913,8 +4496,6 @@
return directoryServer.checkSchema;
}
-
-
/**
* Specifies whether the Directory Server should perform schema checking.
*
@@ -4926,8 +4507,6 @@
directoryServer.checkSchema = checkSchema;
}
-
-
/**
* Retrieves the policy that should be used regarding enforcement of a single
* structural objectclass per entry.
@@ -4940,8 +4519,6 @@
return directoryServer.singleStructuralClassPolicy;
}
-
-
/**
* Specifies the policy that should be used regarding enforcement of a single
* structural objectclass per entry.
@@ -4956,8 +4533,6 @@
directoryServer.singleStructuralClassPolicy = singleStructuralClassPolicy;
}
-
-
/**
* Retrieves the policy that should be used when an attribute value is found
* that is not valid according to the associated attribute syntax.
@@ -4970,8 +4545,6 @@
return directoryServer.syntaxEnforcementPolicy;
}
-
-
/**
* Retrieves the policy that should be used when an attribute value is found
* that is not valid according to the associated attribute syntax.
@@ -4987,8 +4560,6 @@
directoryServer.syntaxEnforcementPolicy = syntaxEnforcementPolicy;
}
-
-
/**
* Indicates whether the Directory Server should send a response to an
* operation that has been abandoned. Sending such a response is technically
@@ -5005,8 +4576,6 @@
return directoryServer.notifyAbandonedOperations;
}
-
-
/**
* Specifies whether the Directory Server should send a response to an
* operation that has been abandoned. Sending such a response is technically
@@ -5024,8 +4593,6 @@
directoryServer.notifyAbandonedOperations = notifyAbandonedOperations;
}
-
-
/**
* Retrieves the set of backends that have been registered with the Directory
* Server, as a mapping between the backend ID and the corresponding backend.
@@ -5038,8 +4605,6 @@
return new TreeMap<String, Backend>(directoryServer.backends);
}
-
-
/**
* Retrieves the backend with the specified backend ID.
*
@@ -5053,8 +4618,6 @@
return directoryServer.backends.get(backendID);
}
-
-
/**
* Indicates whether the Directory Server has a backend with the specified
* backend ID.
@@ -5069,8 +4632,6 @@
return directoryServer.backends.containsKey(backendID);
}
-
-
/**
* Registers the provided backend with the Directory Server. Note that this
* will not register the set of configured suffixes with the server, as that
@@ -5121,8 +4682,6 @@
}
}
-
-
/**
* Deregisters the provided backend with the Directory Server. Note that this
* will not deregister the set of configured suffixes with the server, as that
@@ -5148,7 +4707,6 @@
LocalBackendWorkflowElement.remove(baseDN);
}
-
BackendMonitor monitor = backend.getBackendMonitor();
if (monitor != null)
{
@@ -5159,8 +4717,6 @@
}
}
-
-
/**
* Retrieves the entire set of base DNs registered with the Directory Server,
* mapped from the base DN to the backend responsible for that base DN. The
@@ -5173,8 +4729,6 @@
return directoryServer.baseDnRegistry.getBaseDnMap();
}
-
-
/**
* Retrieves the backend with the specified base DN.
*
@@ -5189,8 +4743,6 @@
return directoryServer.baseDnRegistry.getBaseDnMap().get(baseDN);
}
-
-
/**
* Retrieves the backend that should be used to handle operations on the
* specified entry.
@@ -5225,7 +4777,6 @@
return b;
}
-
/**
* Obtains a copy of the server's base DN registry. The copy can be used
* to test registration/deregistration of base DNs but cannot be used to
@@ -5240,7 +4791,6 @@
return directoryServer.baseDnRegistry.copy();
}
-
/**
* Registers the provided base DN with the server.
*
@@ -5286,8 +4836,6 @@
}
}
-
-
/**
* Deregisters the provided base DN with the server.
*
@@ -5321,8 +4869,6 @@
}
}
-
-
/**
* Retrieves the set of public naming contexts defined in the Directory
* Server, mapped from the naming context DN to the corresponding backend.
@@ -5334,8 +4880,6 @@
return directoryServer.baseDnRegistry.getPublicNamingContextsMap();
}
-
-
/**
* Retrieves the set of private naming contexts defined in the Directory
* Server, mapped from the naming context DN to the corresponding backend.
@@ -5348,8 +4892,6 @@
return directoryServer.baseDnRegistry.getPrivateNamingContextsMap();
}
-
-
/**
* Indicates whether the specified DN is one of the Directory Server naming
* contexts.
@@ -5364,8 +4906,6 @@
return directoryServer.baseDnRegistry.containsNamingContext(dn);
}
-
-
/**
* Retrieves the root DSE entry for the Directory Server.
*
@@ -5376,8 +4916,6 @@
return directoryServer.rootDSEBackend.getRootDSE();
}
-
-
/**
* Retrieves the root DSE backend for the Directory Server.
*
@@ -5388,8 +4926,6 @@
return directoryServer.rootDSEBackend;
}
-
-
/**
* Retrieves the DN of the entry containing the server schema definitions.
*
@@ -5402,8 +4938,6 @@
return directoryServer.schemaDN;
}
-
-
/**
* Specifies the DN of the entry containing the server schema definitions.
*
@@ -5415,8 +4949,6 @@
directoryServer.schemaDN = schemaDN;
}
-
-
/**
* Retrieves the entry with the requested DN. It will first determine which backend should be used
* for this DN and will then use that backend to retrieve the entry. The caller is not required to
@@ -5438,8 +4970,6 @@
return backend != null ? backend.getEntry(entryDN) : null;
}
-
-
/**
* Indicates whether the specified entry exists in the Directory Server. The
* caller is not required to hold any locks when invoking this method.
@@ -5467,8 +4997,6 @@
return backend != null && backend.entryExists(entryDN);
}
-
-
/**
* Retrieves the set of supported controls registered with the Directory
* Server.
@@ -5481,8 +5009,6 @@
return directoryServer.supportedControls;
}
-
-
/**
* Indicates whether the specified OID is registered with the Directory Server
* as a supported control.
@@ -5498,8 +5024,6 @@
return directoryServer.supportedControls.contains(controlOID);
}
-
-
/**
* Registers the provided OID as a supported control for the Directory Server.
* This will have no effect if the specified control OID is already present in
@@ -5516,8 +5040,6 @@
}
}
-
-
/**
* Deregisters the provided OID as a supported control for the Directory
* Server. This will have no effect if the specified control OID is not
@@ -5534,8 +5056,6 @@
}
}
-
-
/**
* Retrieves the set of supported features registered with the Directory
* Server.
@@ -5548,8 +5068,6 @@
return directoryServer.supportedFeatures;
}
-
-
/**
* Indicates whether the specified OID is registered with the Directory Server
* as a supported feature.
@@ -5565,8 +5083,6 @@
return directoryServer.supportedFeatures.contains(featureOID);
}
-
-
/**
* Registers the provided OID as a supported feature for the Directory Server.
* This will have no effect if the specified feature OID is already present in
@@ -5583,8 +5099,6 @@
}
}
-
-
/**
* Deregisters the provided OID as a supported feature for the Directory
* Server. This will have no effect if the specified feature OID is not
@@ -5601,8 +5115,6 @@
}
}
-
-
/**
* Retrieves the set of extended operations that may be processed by the
* Directory Server.
@@ -5616,8 +5128,6 @@
return directoryServer.extendedOperationHandlers;
}
-
-
/**
* Retrieves the handler for the extended operation for the provided OID.
*
@@ -5631,8 +5141,6 @@
return directoryServer.extendedOperationHandlers.get(oid);
}
-
-
/**
* Registers the provided extended operation handler with the Directory
* Server.
@@ -5647,8 +5155,6 @@
directoryServer.extendedOperationHandlers.put(toLowerCase(oid), handler);
}
-
-
/**
* Deregisters the provided extended operation handler with the Directory
* Server.
@@ -5660,8 +5166,6 @@
directoryServer.extendedOperationHandlers.remove(toLowerCase(oid));
}
-
-
/**
* Retrieves the set of SASL mechanisms that are supported by the Directory
* Server.
@@ -5675,8 +5179,6 @@
return directoryServer.saslMechanismHandlers;
}
-
-
/**
* Retrieves the handler for the specified SASL mechanism.
*
@@ -5690,8 +5192,6 @@
return directoryServer.saslMechanismHandlers.get(name);
}
-
-
/**
* Registers the provided SASL mechanism handler with the Directory Server.
*
@@ -5707,8 +5207,6 @@
directoryServer.saslMechanismHandlers.put(name, handler);
}
-
-
/**
* Deregisters the provided SASL mechanism handler with the Directory Server.
*
@@ -5720,8 +5218,6 @@
directoryServer.saslMechanismHandlers.remove(name);
}
-
-
/**
* Retrieves the supported LDAP versions for the Directory Server.
*
@@ -5732,8 +5228,6 @@
return directoryServer.supportedLDAPVersions.keySet();
}
-
-
/**
* Registers the provided LDAP protocol version as supported within the
* Directory Server.
@@ -5760,8 +5254,6 @@
}
}
-
-
/**
* Deregisters the provided LDAP protocol version as supported within the
* Directory Server.
@@ -5786,9 +5278,6 @@
}
}
-
-
-
/**
* Retrieves the set of identity mappers defined in the Directory Server
* configuration, as a mapping between the DN of the configuration entry and
@@ -5802,8 +5291,6 @@
return directoryServer.identityMappers;
}
-
-
/**
* Retrieves the Directory Server identity mapper whose configuration resides
* in the specified configuration entry.
@@ -5820,8 +5307,6 @@
return directoryServer.identityMappers.get(configEntryDN);
}
-
-
/**
* Registers the provided identity mapper for use with the Directory Server.
*
@@ -5835,8 +5320,6 @@
directoryServer.identityMappers.put(configEntryDN, identityMapper);
}
-
-
/**
* Deregisters the provided identity mapper for use with the Directory Server.
*
@@ -5848,8 +5331,6 @@
directoryServer.identityMappers.remove(configEntryDN);
}
-
-
/**
* Retrieves the DN of the configuration entry for the identity mapper that
* should be used in conjunction with proxied authorization V2 controls.
@@ -5863,8 +5344,6 @@
return directoryServer.proxiedAuthorizationIdentityMapperDN;
}
-
-
/**
* Specifies the DN of the configuration entry for the identity mapper that
* should be used in conjunction with proxied authorization V2 controls.
@@ -5882,8 +5361,6 @@
proxiedAuthorizationIdentityMapperDN;
}
-
-
/**
* Retrieves the identity mapper that should be used to resolve authorization
* IDs contained in proxied authorization V2 controls.
@@ -5903,8 +5380,6 @@
directoryServer.proxiedAuthorizationIdentityMapperDN);
}
-
-
/**
* Retrieves the set of connection handlers configured in the Directory
* Server. The returned list must not be altered.
@@ -5916,8 +5391,6 @@
return directoryServer.connectionHandlers;
}
-
-
/**
* Registers the provided connection handler with the Directory Server.
*
@@ -5939,8 +5412,6 @@
}
}
-
-
/**
* Deregisters the provided connection handler with the Directory Server.
*
@@ -5963,8 +5434,6 @@
}
}
-
-
/**
* Starts the connection handlers defined in the Directory Server
* Configuration.
@@ -5999,7 +5468,6 @@
throw new ConfigException(ERR_ERROR_STARTING_CONNECTION_HANDLERS.get());
}
-
// If there are no connection handlers log a message.
if (connectionHandlers.isEmpty())
{
@@ -6024,8 +5492,6 @@
return directoryServer.workQueue;
}
-
-
/**
* Runs all the necessary checks prior to adding an operation to the work
* queue. It throws a DirectoryException if one of the check fails.
@@ -6074,7 +5540,6 @@
}
}
-
// If the associated user is required to change their password before
// continuing, then make sure the associated operation is one that could
// result in the password being changed. If not, then reject it.
@@ -6191,8 +5656,6 @@
return directoryServer.synchronizationProviders;
}
-
-
/**
* Registers the provided synchronization provider with the Directory Server.
*
@@ -6206,8 +5669,6 @@
provider.completeSynchronizationProvider();
}
-
-
/**
* Deregisters the provided synchronization provider with the Directory
* Server.
@@ -6220,8 +5681,6 @@
directoryServer.synchronizationProviders.remove(provider);
}
-
-
/**
* Retrieves a set containing the names of the allowed tasks that may be
* invoked in the server.
@@ -6234,8 +5693,6 @@
return directoryServer.allowedTasks;
}
-
-
/**
* Specifies the set of allowed tasks that may be invoked in the server.
*
@@ -6247,8 +5704,6 @@
directoryServer.allowedTasks = allowedTasks;
}
-
-
/**
* Retrieves the set of privileges that have been disabled.
*
@@ -6259,8 +5714,6 @@
return directoryServer.disabledPrivileges;
}
-
-
/**
* Indicates whether the specified privilege is disabled.
*
@@ -6274,8 +5727,6 @@
return directoryServer.disabledPrivileges.contains(privilege);
}
-
-
/**
* Specifies the set of privileges that should be disabled in the server.
*
@@ -6287,8 +5738,6 @@
directoryServer.disabledPrivileges = disabledPrivileges;
}
-
-
/**
* Indicates whether responses to failed bind operations should include a
* message explaining the reason for the failure.
@@ -6301,8 +5750,6 @@
return directoryServer.returnBindErrorMessages;
}
-
-
/**
* Specifies whether responses to failed bind operations should include a
* message explaining the reason for the failure.
@@ -6316,8 +5763,6 @@
directoryServer.returnBindErrorMessages = returnBindErrorMessages;
}
-
-
/**
* Retrieves the maximum length of time in milliseconds that client
* connections should be allowed to remain idle without being disconnected.
@@ -6330,8 +5775,6 @@
return directoryServer.idleTimeLimit;
}
-
-
/**
* Specifies the maximum length of time in milliseconds that client
* connections should be allowed to remain idle without being disconnected.
@@ -6345,8 +5788,6 @@
directoryServer.idleTimeLimit = idleTimeLimit;
}
-
-
/**
* Indicates whether the Directory Server should save a copy of its
* configuration whenever it is started successfully.
@@ -6359,8 +5800,6 @@
return directoryServer.saveConfigOnSuccessfulStartup;
}
-
-
/**
* Specifies whether the Directory Server should save a copy of its
* configuration whenever it is started successfully.
@@ -6376,8 +5815,6 @@
saveConfigOnSuccessfulStartup;
}
-
-
/**
* Registers the provided backup task listener with the Directory Server.
*
@@ -6389,8 +5826,6 @@
directoryServer.backupTaskListeners.addIfAbsent(listener);
}
-
-
/**
* Deregisters the provided backup task listener with the Directory Server.
*
@@ -6402,8 +5837,6 @@
directoryServer.backupTaskListeners.remove(listener);
}
-
-
/**
* Notifies the registered backup task listeners that the server will be
* beginning a backup task with the provided information.
@@ -6426,8 +5859,6 @@
}
}
-
-
/**
* Notifies the registered backup task listeners that the server has completed
* processing on a backup task with the provided information.
@@ -6451,8 +5882,6 @@
}
}
-
-
/**
* Registers the provided restore task listener with the Directory Server.
*
@@ -6464,8 +5893,6 @@
directoryServer.restoreTaskListeners.addIfAbsent(listener);
}
-
-
/**
* Deregisters the provided restore task listener with the Directory Server.
*
@@ -6477,8 +5904,6 @@
directoryServer.restoreTaskListeners.remove(listener);
}
-
-
/**
* Notifies the registered restore task listeners that the server will be
* beginning a restore task with the provided information.
@@ -6501,8 +5926,6 @@
}
}
-
-
/**
* Notifies the registered restore task listeners that the server has
* completed processing on a restore task with the provided information.
@@ -6526,8 +5949,6 @@
}
}
-
-
/**
* Registers the provided LDIF export task listener with the Directory Server.
*
@@ -6539,8 +5960,6 @@
directoryServer.exportTaskListeners.addIfAbsent(listener);
}
-
-
/**
* Deregisters the provided LDIF export task listener with the Directory
* Server.
@@ -6553,8 +5972,6 @@
directoryServer.exportTaskListeners.remove(listener);
}
-
-
/**
* Notifies the registered LDIF export task listeners that the server will be
* beginning an export task with the provided information.
@@ -6577,8 +5994,6 @@
}
}
-
-
/**
* Notifies the registered LDIF export task listeners that the server has
* completed processing on an export task with the provided information.
@@ -6602,8 +6017,6 @@
}
}
-
-
/**
* Registers the provided LDIF import task listener with the Directory Server.
*
@@ -6615,8 +6028,6 @@
directoryServer.importTaskListeners.addIfAbsent(listener);
}
-
-
/**
* Deregisters the provided LDIF import task listener with the Directory
* Server.
@@ -6629,8 +6040,6 @@
directoryServer.importTaskListeners.remove(listener);
}
-
-
/**
* Notifies the registered LDIF import task listeners that the server will be
* beginning an import task with the provided information.
@@ -6653,8 +6062,6 @@
}
}
-
-
/**
* Notifies the registered LDIF import task listeners that the server has
* completed processing on an import task with the provided information.
@@ -6715,8 +6122,6 @@
directoryServer.shutdownListeners.add(listener);
}
-
-
/**
* Deregisters the provided shutdown listener with the Directory Server.
*
@@ -6728,7 +6133,6 @@
directoryServer.shutdownListeners.remove(listener);
}
-
/**
* Initiates the Directory Server shutdown process. Note that once this has
* started, it should not be interrupted.
@@ -6756,13 +6160,11 @@
sendAlertNotification(directoryServer, ALERT_TYPE_SERVER_SHUTDOWN,
NOTE_SERVER_SHUTDOWN.get(className, reason));
-
// Create a shutdown monitor that will watch the rest of the shutdown
// process to ensure that everything goes smoothly.
ServerShutdownMonitor shutdownMonitor = new ServerShutdownMonitor();
shutdownMonitor.start();
-
// Shut down the connection handlers.
for (ConnectionHandler handler : directoryServer.connectionHandlers)
{
@@ -6809,7 +6211,6 @@
catch (Exception e) {}
}
-
// Notify all the shutdown listeners.
for (ServerShutdownListener shutdownListener :
directoryServer.shutdownListeners)
@@ -6824,14 +6225,12 @@
}
}
-
// Shut down all of the alert handlers.
for (AlertHandler alertHandler : directoryServer.alertHandlers)
{
alertHandler.finalizeAlertHandler();
}
-
// Deregister all of the JMX MBeans.
if (directoryServer.mBeanServer != null)
{
@@ -6853,7 +6252,6 @@
}
}
-
// Finalize all of the SASL mechanism handlers.
for (SASLMechanismHandler handler :
directoryServer.saslMechanismHandlers.values())
@@ -6868,7 +6266,6 @@
}
}
-
// Finalize all of the extended operation handlers.
for (ExtendedOperationHandler handler :
directoryServer.extendedOperationHandlers.values())
@@ -6883,7 +6280,6 @@
}
}
-
// Finalize the password policy map.
for (DN configEntryDN : directoryServer.authenticationPolicies.keySet())
{
@@ -6920,7 +6316,6 @@
// Shut down all the other components that may need special handling.
// NYI
-
// Shut down the monitor providers.
for (MonitorProvider monitor : directoryServer.monitorProviders.values())
{
@@ -6934,7 +6329,6 @@
}
}
-
// Shut down the backends.
for (Backend<?> backend : directoryServer.backends.values())
{
@@ -7016,7 +6410,6 @@
// the monitor to give the OK to stop.
shutdownMonitor.waitForMonitor();
-
// At this point, the server is no longer running. We should destroy the
// handle to the previous instance, but we will want to get a new instance
// in case the server is to be started again later in the same JVM. Before
@@ -7026,8 +6419,6 @@
directoryServer = getNewInstance(envConfig);
}
-
-
/**
* Destroy key structures in the current Directory Server instance in a manner
* that can help detect any inappropriate cached references to server
@@ -7080,8 +6471,6 @@
}
}
-
-
/**
* Causes the Directory Server to perform an in-core restart. This will
* cause virtually all components of the Directory Server to shut down, and
@@ -7097,8 +6486,6 @@
restart(className, reason, directoryServer.environmentConfig);
}
-
-
/**
* Causes the Directory Server to perform an in-core restart. This will
* cause virtually all components of the Directory Server to shut down, and
@@ -7130,8 +6517,6 @@
}
}
-
-
/**
* Reinitializes the server following a shutdown, preparing it for a call to
* {@code startServer}.
@@ -7149,8 +6534,6 @@
return reinitialize(directoryServer.environmentConfig);
}
-
-
/**
* Reinitializes the server following a shutdown, preparing it for a call to
* {@code startServer}.
@@ -7176,8 +6559,6 @@
return directoryServer;
}
-
-
/**
* Retrieves the maximum number of concurrent client connections that may be
* established.
@@ -7190,8 +6571,6 @@
return directoryServer.maxAllowedConnections;
}
-
-
/**
* Specifies the maximum number of concurrent client connections that may be
* established. A value that is less than or equal to zero will indicate that
@@ -7212,8 +6591,6 @@
}
}
-
-
/**
* Indicates that a new connection has been accepted and increments the
* associated counters.
@@ -7256,8 +6633,6 @@
}
}
-
-
/**
* Indicates that the specified client connection has been closed.
*
@@ -7272,8 +6647,6 @@
}
}
-
-
/**
* Retrieves the number of client connections that are currently established.
*
@@ -7284,8 +6657,6 @@
return directoryServer.currentConnections;
}
-
-
/**
* Retrieves the maximum number of client connections that have been
* established concurrently.
@@ -7298,8 +6669,6 @@
return directoryServer.maxConnections;
}
-
-
/**
* Retrieves the total number of client connections that have been established
* since the Directory Server started.
@@ -7312,8 +6681,6 @@
return directoryServer.totalConnections;
}
-
-
/**
* Retrieves the full version string for the Directory Server.
*
@@ -7347,7 +6714,6 @@
}
}
-
/**
* Retrieves the default maximum number of entries that should be returned for
* a search.
@@ -7360,8 +6726,6 @@
return directoryServer.sizeLimit;
}
-
-
/**
* Specifies the default maximum number of entries that should be returned for
* a search.
@@ -7374,8 +6738,6 @@
directoryServer.sizeLimit = sizeLimit;
}
-
-
/**
* Retrieves the default maximum number of entries that should checked for
* matches during a search.
@@ -7388,8 +6750,6 @@
return directoryServer.lookthroughLimit;
}
-
-
/**
* Specifies the default maximum number of entries that should be checked for
* matches during a search.
@@ -7402,8 +6762,6 @@
directoryServer.lookthroughLimit = lookthroughLimit;
}
-
-
/**
* Specifies the maximum number of simultaneous persistent
* searches that are allowed.
@@ -7416,8 +6774,6 @@
directoryServer.maxPSearches = maxPSearches;
}
-
-
/**
* Registers a new persistent search by increasing the count
* of active persistent searches. After receiving a persistent
@@ -7430,8 +6786,6 @@
directoryServer.activePSearches.incrementAndGet();
}
-
-
/**
* Deregisters a canceled persistent search. After a persistent
* search is canceled, the handler must call this method to let
@@ -7443,8 +6797,6 @@
directoryServer.activePSearches.decrementAndGet();
}
-
-
/**
* Indicates whether a new persistent search is allowed.
*
@@ -7458,8 +6810,6 @@
|| directoryServer.activePSearches.get() < directoryServer.maxPSearches;
}
-
-
/**
* Retrieves the default maximum length of time in seconds that should be
* allowed when processing a search.
@@ -7472,8 +6822,6 @@
return directoryServer.timeLimit;
}
-
-
/**
* Specifies the default maximum length of time in seconds that should be
* allowed when processing a search.
@@ -7486,8 +6834,6 @@
directoryServer.timeLimit = timeLimit;
}
-
-
/**
* Specifies whether to collect nanosecond resolution processing times for
* operations.
@@ -7501,8 +6847,6 @@
directoryServer.useNanoTime = useNanoTime;
}
-
-
/**
* Retrieves whether operation processing times should be collected with
* nanosecond resolution.
@@ -7516,8 +6860,6 @@
return directoryServer.useNanoTime;
}
-
-
/**
* Retrieves the writability mode for the Directory Server. This will only
* be applicable for user suffixes.
@@ -7529,8 +6871,6 @@
return directoryServer.writabilityMode;
}
-
-
/**
* Specifies the writability mode for the Directory Server. This will only
* be applicable for user suffixes.
@@ -7543,9 +6883,6 @@
directoryServer.writabilityMode = writabilityMode;
}
-
-
-
/**
* Indicates whether simple bind requests that contain a bind DN will also be
* required to have a password.
@@ -7559,8 +6896,6 @@
return directoryServer.bindWithDNRequiresPassword;
}
-
-
/**
* Specifies whether simple bind requests that contain a bind DN will also be
* required to have a password.
@@ -7575,8 +6910,6 @@
directoryServer.bindWithDNRequiresPassword = bindWithDNRequiresPassword;
}
-
-
/**
* Indicates whether an unauthenticated request should be rejected.
*
@@ -7602,8 +6935,6 @@
rejectUnauthenticatedRequests;
}
-
-
/**
* Indicates whether the Directory Server is currently configured to operate
* in the lockdown mode, in which all non-root requests will be rejected and
@@ -7617,8 +6948,6 @@
return directoryServer.lockdownMode;
}
-
-
/**
* Specifies whether the server should operate in lockdown mode.
*
@@ -7647,7 +6976,6 @@
}
}
-
/**
* Sets the message to be displayed on the command-line when the user asks for
* the usage.
@@ -7690,8 +7018,6 @@
}
}
-
-
/**
* Retrieves the fully-qualified name of the Java class for this alert
* generator implementation.
@@ -7705,8 +7031,6 @@
return DirectoryServer.class.getName();
}
-
-
/**
* Retrieves information about the set of alerts that this generator may
* produce. The map returned should be between the notification type for a
@@ -7732,8 +7056,6 @@
return alerts;
}
-
-
/**
* Indicates whether the server is currently in the process of shutting down.
* @return <CODE>true</CODE> if this server is currently in the process of
@@ -7744,8 +7066,6 @@
return shuttingDown;
}
-
-
/**
* Parses the provided command-line arguments and uses that information to
* bootstrap and start the Directory Server.
@@ -7767,7 +7087,6 @@
StringArgument configClass = null;
StringArgument configFile = null;
-
// Create the command-line argument parser for use with this program.
LocalizableMessage theToolDescription = DirectoryServer.toolDescription;
ArgumentParser argParser =
@@ -7783,63 +7102,51 @@
true, false, true,
INFO_CONFIGCLASS_PLACEHOLDER.get(),
ConfigFileHandler.class.getName(), null,
- INFO_DSCORE_DESCRIPTION_CONFIG_CLASS
- .get());
+ INFO_DSCORE_DESCRIPTION_CONFIG_CLASS.get());
configClass.setHidden(true);
argParser.addArgument(configClass);
-
configFile = new StringArgument("configfile", 'f', "configFile",
true, false, true,
INFO_CONFIGFILE_PLACEHOLDER.get(), null,
null,
- INFO_DSCORE_DESCRIPTION_CONFIG_FILE
- .get());
+ INFO_DSCORE_DESCRIPTION_CONFIG_FILE.get());
configFile.setHidden(true);
argParser.addArgument(configFile);
-
checkStartability = new BooleanArgument("checkstartability", null,
"checkStartability",
INFO_DSCORE_DESCRIPTION_CHECK_STARTABILITY.get());
checkStartability.setHidden(true);
argParser.addArgument(checkStartability);
- windowsNetStart = new BooleanArgument("windowsnetstart", null,
- "windowsNetStart",
+ windowsNetStart = new BooleanArgument("windowsnetstart", null, "windowsNetStart",
INFO_DSCORE_DESCRIPTION_WINDOWS_NET_START.get());
windowsNetStart.setHidden(true);
argParser.addArgument(windowsNetStart);
-
fullVersion = new BooleanArgument("fullversion", 'F', "fullVersion",
- INFO_DSCORE_DESCRIPTION_FULLVERSION
- .get());
+ INFO_DSCORE_DESCRIPTION_FULLVERSION.get());
fullVersion.setHidden(true);
argParser.addArgument(fullVersion);
-
systemInfo = new BooleanArgument("systeminfo", 's', "systemInfo",
INFO_DSCORE_DESCRIPTION_SYSINFO.get());
argParser.addArgument(systemInfo);
-
useLastKnownGoodConfig =
new BooleanArgument("lastknowngoodconfig", 'L',
"useLastKnownGoodConfig",
INFO_DSCORE_DESCRIPTION_LASTKNOWNGOODCFG.get());
argParser.addArgument(useLastKnownGoodConfig);
-
noDetach = new BooleanArgument("nodetach", 'N', "nodetach",
INFO_DSCORE_DESCRIPTION_NODETACH.get());
argParser.addArgument(noDetach);
-
quietMode = CommonArguments.getQuiet();
argParser.addArgument(quietMode);
-
// Not used in this class, but required by the start-ds script
// (see issue #3814)
timeout = new IntegerArgument("timeout", 't', "timeout", true, false,
@@ -7861,7 +7168,6 @@
System.exit(1);
}
-
// Parse the command-line arguments provided to this program.
try
{
@@ -7875,7 +7181,6 @@
System.exit(1);
}
-
// If we should just display usage information, then print it and exit.
if (checkStartability.isPresent())
{
@@ -7949,7 +7254,6 @@
System.exit(1);
}
-
// At this point, we know that we're going to try to start the server.
// Attempt to grab an exclusive lock for the Directory Server process.
String lockFile = LockFileManager.getServerLockFileName();
@@ -8026,7 +7330,6 @@
}
} catch (Exception e) {}
-
// Redirect standard output and standard error to the server.out file. If
// the server hasn't detached from the terminal, then also continue writing
// to the original standard output and standard error. Also, configure the
@@ -8180,8 +7483,6 @@
}
}
-
-
/**
* Gets the class loader to be used with this directory server
* application.
@@ -8226,8 +7527,6 @@
return Class.forName(name, true, DirectoryServer.getClassLoader());
}
-
-
/**
* Returns the error code that we return when we are checking the startability
* of the server.
@@ -8357,20 +7656,13 @@
*/
public static boolean isRunningAsWindowsService()
{
- boolean isRunningAsWindowsService = false;
- if (OperatingSystem.isWindows())
- {
- isRunningAsWindowsService =
- ConfigureWindowsService.serviceState() == ConfigureWindowsService.SERVICE_STATE_ENABLED;
- }
- return isRunningAsWindowsService;
+ return OperatingSystem.isWindows()
+ && serviceState() == SERVICE_STATE_ENABLED;
}
// TODO JNR remove error CoreMessages.ERR_REGISTER_WORKFLOW_ELEMENT_ALREADY_EXISTS
- /**
- * Print messages for start-ds "-F" option (full version information).
- */
+ /** Print messages for start-ds "-F" option (full version information). */
private static void printFullVersionInformation() {
/*
* This option is used by the upgrade to identify the server build and it
@@ -8416,8 +7708,6 @@
}
}
-
-
/**
* Sets the threshold capacity beyond which internal cached buffers used for
* encoding and decoding entries and protocol messages will be trimmed after
@@ -8433,8 +7723,6 @@
directoryServer.maxInternalBufferSize = maxInternalBufferSize;
}
-
-
/**
* Returns the threshold capacity beyond which internal cached buffers used
* for encoding and decoding entries and protocol messages will be trimmed
diff --git a/opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/tools/ConfigureWindowsService.java b/opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/tools/ConfigureWindowsService.java
index 9436525..235811b 100644
--- a/opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/tools/ConfigureWindowsService.java
+++ b/opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/tools/ConfigureWindowsService.java
@@ -47,7 +47,11 @@
import org.opends.server.util.DynamicConstants;
import org.opends.server.util.SetupUtils;
-import com.forgerock.opendj.cli.*;
+import com.forgerock.opendj.cli.ArgumentException;
+import com.forgerock.opendj.cli.ArgumentParser;
+import com.forgerock.opendj.cli.BooleanArgument;
+import com.forgerock.opendj.cli.CommonArguments;
+import com.forgerock.opendj.cli.StringArgument;
/**
* This class is used to configure the Windows service for this instance on
@@ -272,11 +276,11 @@
*/
static String getServiceName()
{
- String serviceName = null;
String serverRoot = getServerRoot();
String[] cmd = { getBinaryFullPath(), "state", serverRoot };
try
{
+ String serviceName = null;
Process p = Runtime.getRuntime().exec(cmd);
BufferedReader stdout = new BufferedReader(new InputStreamReader(p.getInputStream()));
boolean processDone = false;
@@ -300,13 +304,12 @@
}
}
}
+ return serviceName;
}
catch (Throwable t)
{
- serviceName = null;
+ return null;
}
-
- return serviceName;
}
/**
--
Gitblit v1.10.0