| | |
| | | |
| | | import org.opends.server.admin.server.ConfigurationChangeListener; |
| | | import org.opends.server.admin.std.server.AlertHandlerCfg; |
| | | import org.opends.server.admin.std.server.JMXAlertHandlerCfg; |
| | | import org.opends.server.api.AlertGenerator; |
| | | import org.opends.server.api.AlertHandler; |
| | | import org.opends.server.api.DirectoryServerMBean; |
| | |
| | | */ |
| | | public class JMXAlertHandler |
| | | extends NotificationBroadcasterSupport |
| | | implements AlertHandler<AlertHandlerCfg>, |
| | | ConfigurationChangeListener<AlertHandlerCfg>, DynamicMBean, |
| | | implements AlertHandler<JMXAlertHandlerCfg>, |
| | | ConfigurationChangeListener<JMXAlertHandlerCfg>, DynamicMBean, |
| | | DirectoryServerMBean |
| | | { |
| | | /** |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public void initializeAlertHandler(AlertHandlerCfg configuration) |
| | | public void initializeAlertHandler(JMXAlertHandlerCfg configuration) |
| | | throws ConfigException, InitializationException |
| | | { |
| | | sequenceNumber = new AtomicLong(1); |
| | |
| | | |
| | | if (configuration != null) |
| | | { |
| | | configuration.addChangeListener(this); |
| | | configuration.addJMXChangeListener(this); |
| | | currentConfig = configuration; |
| | | } |
| | | } |
| | |
| | | public boolean isConfigurationAcceptable(AlertHandlerCfg configuration, |
| | | List<Message> unacceptableReasons) |
| | | { |
| | | return true; |
| | | JMXAlertHandlerCfg cfg = (JMXAlertHandlerCfg) configuration; |
| | | return isConfigurationChangeAcceptable(cfg, unacceptableReasons); |
| | | } |
| | | |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean isConfigurationChangeAcceptable(AlertHandlerCfg configuration, |
| | | public boolean isConfigurationChangeAcceptable( |
| | | JMXAlertHandlerCfg configuration, |
| | | List<Message> unacceptableReasons) |
| | | { |
| | | return true; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public ConfigChangeResult applyConfigurationChange( |
| | | AlertHandlerCfg configuration) |
| | | JMXAlertHandlerCfg configuration) |
| | | { |
| | | currentConfig = configuration; |
| | | |