mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

neil_a_wilson
19.24.2007 efbc2ca28bd36a2f5b712ecd9da9dfead7692614
opendj-sdk/opends/src/server/org/opends/server/api/AlertHandler.java
@@ -28,7 +28,9 @@
import org.opends.server.config.ConfigEntry;
import java.util.List;
import org.opends.server.admin.std.server.AlertHandlerCfg;
import org.opends.server.config.ConfigException;
import org.opends.server.types.InitializationException;
@@ -39,16 +41,18 @@
 * for a Directory Server alert handler.  Alert handlers are used to
 * present alert notifications in various forms like JMX, e-mail, or
 * paging.
 *
 * @param  <T>  The type of configuration handled by this alert
 *              handler.
 */
public interface AlertHandler
public interface AlertHandler<T extends AlertHandlerCfg>
{
  /**
   * Initializes this alert handler based on the information in the
   * provided configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the
   *                      information to use to initialize this alert
   *                      handler.
   * @param  configuration  The configuration to use to initialize
   *                        this alert handler.
   *
   * @throws  ConfigException  If the provided entry does not contain
   *                           a valid configuration for this alert
@@ -59,12 +63,31 @@
   *                                   related to the server
   *                                   configuration.
   */
  public void initializeAlertHandler(ConfigEntry configEntry)
  public void initializeAlertHandler(T configuration)
       throws ConfigException, InitializationException;
  /**
   * Indicates whether the provided configuration is acceptable for
   * this alert handler.
   *
   * @param  configuration        The configuration for which to make
   *                              tje determination.
   * @param  unacceptableReasons  A list to which human-readable
   *                              reasons may be added to explain why
   *                              the configuration is not acceptable.
   *
   * @return  {@code true} if the provided configuration is
   *          acceptable, or {@code false} if it is not.
   */
  public boolean isConfigurationAcceptable(
                      AlertHandlerCfg configuration,
                      List<String> unacceptableReasons);
  /**
   * Performs any necessary cleanup that may be necessary when this
   * alert handler is finalized.
   */