boolean adminActionRequired = false;
ArrayList<Message> messages = new ArrayList<Message>();
// Get the existing monitor provider if it's already enabled.
MonitorProvider existingMonitor = monitors.get(configuration.dn());
// If the new configuration has the monitor disabled, then disable it if it
// is enabled, or do nothing if it's already disabled.
if (! configuration.isEnabled())
{
if (existingMonitor != null)
{
String lowerName =
toLowerCase(existingMonitor.getMonitorInstanceName());
DirectoryServer.deregisterMonitorProvider(lowerName);
MonitorProvider monitor = monitors.remove(configuration.dn());
if (monitor != null)
{
monitor.finalizeMonitorProvider();
}
}
return new ConfigChangeResult(resultCode, adminActionRequired, messages);
}