root.addConnectionHandlerAddListener(this);
root.addConnectionHandlerDeleteListener(this);
// Initialize existing connection handles.
for (String name : root.listConnectionHandlers()) {
ConnectionHandlerCfg config = root
.getConnectionHandler(name);
// Register as a change listener for this connection handler
// entry so that we will be notified of any changes that may be
// made to it.
config.addChangeListener(this);
// Ignore this connection handler if it is disabled.
if (config.isEnabled()) {
// Note that we don't want to start the connection handler
// because we're still in the startup process. Therefore, we
// will not do so and allow the server to start it at the very
// end of the initialization process.
ConnectionHandler<? extends ConnectionHandlerCfg> connectionHandler =
getConnectionHandler(config);
// Put this connection handler in the hash so that we will be
// able to find it if it is altered.
connectionHandlers.put(config.dn(), connectionHandler);
// Register the connection handler with the Directory Server.
DirectoryServer.registerConnectionHandler(connectionHandler);
}
}