public class SMTPAlertHandler extends Object implements AlertHandler<org.forgerock.opendj.server.config.server.SmtpAlertHandlerCfg>, org.forgerock.opendj.config.server.ConfigurationChangeListener<org.forgerock.opendj.server.config.server.SmtpAlertHandlerCfg>
Constructor and Description |
---|
SMTPAlertHandler()
Creates a new instance of this SMTP alert handler.
|
Modifier and Type | Method and Description |
---|---|
org.forgerock.opendj.config.server.ConfigChangeResult |
applyConfigurationChange(org.forgerock.opendj.server.config.server.SmtpAlertHandlerCfg configuration) |
void |
finalizeAlertHandler()
Performs any necessary cleanup that may be necessary when this
alert handler is finalized.
|
org.forgerock.opendj.server.config.server.AlertHandlerCfg |
getAlertHandlerConfiguration()
Retrieves the current configuration for this alert handler.
|
void |
initializeAlertHandler(org.forgerock.opendj.server.config.server.SmtpAlertHandlerCfg configuration)
Initializes this alert handler based on the information in the
provided configuration entry.
|
boolean |
isConfigurationAcceptable(org.forgerock.opendj.server.config.server.AlertHandlerCfg configuration,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the provided configuration is acceptable for
this alert handler.
|
boolean |
isConfigurationChangeAcceptable(org.forgerock.opendj.server.config.server.SmtpAlertHandlerCfg configuration,
List<LocalizableMessage> unacceptableReasons) |
void |
sendAlertNotification(AlertGenerator generator,
String alertType,
LocalizableMessage alertMessage)
Sends an alert notification based on the provided information.
|
public SMTPAlertHandler()
public void initializeAlertHandler(org.forgerock.opendj.server.config.server.SmtpAlertHandlerCfg configuration) throws org.forgerock.opendj.config.server.ConfigException, InitializationException
AlertHandler
initializeAlertHandler
in interface AlertHandler<org.forgerock.opendj.server.config.server.SmtpAlertHandlerCfg>
configuration
- The configuration to use to initialize
this alert handler.org.forgerock.opendj.config.server.ConfigException
- If the provided entry does not contain
a valid configuration for this alert
handler.InitializationException
- If a problem occurs during
initialization that is not
related to the server
configuration.public org.forgerock.opendj.server.config.server.AlertHandlerCfg getAlertHandlerConfiguration()
AlertHandler
getAlertHandlerConfiguration
in interface AlertHandler<org.forgerock.opendj.server.config.server.SmtpAlertHandlerCfg>
public boolean isConfigurationAcceptable(org.forgerock.opendj.server.config.server.AlertHandlerCfg configuration, List<LocalizableMessage> unacceptableReasons)
AlertHandler
isConfigurationAcceptable
in interface AlertHandler<org.forgerock.opendj.server.config.server.SmtpAlertHandlerCfg>
configuration
- The configuration for which to make
tje determination.unacceptableReasons
- A list to which human-readable
reasons may be added to explain why
the configuration is not acceptable.true
if the provided configuration is
acceptable, or false
if it is not.public void finalizeAlertHandler()
AlertHandler
finalizeAlertHandler
in interface AlertHandler<org.forgerock.opendj.server.config.server.SmtpAlertHandlerCfg>
public void sendAlertNotification(AlertGenerator generator, String alertType, LocalizableMessage alertMessage)
AlertHandler
sendAlertNotification
in interface AlertHandler<org.forgerock.opendj.server.config.server.SmtpAlertHandlerCfg>
generator
- The alert generator that created the alert.alertType
- The alert type name for this alert.alertMessage
- A message (possibly null
) that can
provide more information about this alert.public boolean isConfigurationChangeAcceptable(org.forgerock.opendj.server.config.server.SmtpAlertHandlerCfg configuration, List<LocalizableMessage> unacceptableReasons)
isConfigurationChangeAcceptable
in interface org.forgerock.opendj.config.server.ConfigurationChangeListener<org.forgerock.opendj.server.config.server.SmtpAlertHandlerCfg>
public org.forgerock.opendj.config.server.ConfigChangeResult applyConfigurationChange(org.forgerock.opendj.server.config.server.SmtpAlertHandlerCfg configuration)
applyConfigurationChange
in interface org.forgerock.opendj.config.server.ConfigurationChangeListener<org.forgerock.opendj.server.config.server.SmtpAlertHandlerCfg>
Copyright © 2010-2017 ForgeRock AS. All Rights Reserved.