Package org.opends.server.api
Class AccountStatusNotificationHandler<T extends AccountStatusNotificationHandlerCfg>
java.lang.Object
org.opends.server.api.AccountStatusNotificationHandler<T>
- Type Parameters:
T
- The type of configuration handled by this notification handler.
- Direct Known Subclasses:
ErrorLogAccountStatusNotificationHandler
,SMTPAccountStatusNotificationHandler
public abstract class AccountStatusNotificationHandler<T extends AccountStatusNotificationHandlerCfg>
extends Object
This class defines the set of methods that must be implemented for an account status notification handler. This
handler will be invoked whenever certain types of events occur that could change the status of a user account. The
account status notification handler may be used to notify the user and/or administrators of the change.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Performs any finalization that may be necessary when this status notification handler is taken out of service.abstract void
handleStatusNotification
(AccountStatusNotification notification) Performs any processing that may be necessary in conjunction with the provided account status notification.abstract void
initializeStatusNotificationHandler
(T configuration, ServerContext serverContext) Initializes this account status notification handler based on the information in the provided configuration entry.boolean
isConfigurationAcceptable
(T configuration, ServerContext serverContext, List<LocalizableMessage> unacceptableReasons) Indicates whether the provided configuration is acceptable for this account status notification handler.
-
Constructor Details
-
AccountStatusNotificationHandler
public AccountStatusNotificationHandler()
-
-
Method Details
-
initializeStatusNotificationHandler
public abstract void initializeStatusNotificationHandler(T configuration, ServerContext serverContext) throws ConfigException, InitializationException Initializes this account status notification handler based on the information in the provided configuration entry.- Parameters:
configuration
- The configuration entry that contains the information to use to initialize this account status notification handler.serverContext
- The server context- Throws:
ConfigException
- If the provided entry does not contain a valid configuration for this account status notification handler.InitializationException
- If a problem occurs during initialization that is not related to the server configuration.
-
isConfigurationAcceptable
public boolean isConfigurationAcceptable(T configuration, ServerContext serverContext, List<LocalizableMessage> unacceptableReasons) Indicates whether the provided configuration is acceptable for this account status notification handler. It should be possible to call this method on an uninitialized account status notification handler instance in order to determine whether the handler would be able to use the provided configuration.- Parameters:
configuration
- The account status notification handler configuration for which to make the determination.serverContext
- The server contextunacceptableReasons
- A list that may be used to hold the reasons that the provided configuration is not acceptable.- Returns:
true
if the provided configuration is acceptable for this account status notification handler, orfalse
if not.
-
finalizeStatusNotificationHandler
public void finalizeStatusNotificationHandler()Performs any finalization that may be necessary when this status notification handler is taken out of service. -
handleStatusNotification
Performs any processing that may be necessary in conjunction with the provided account status notification.- Parameters:
notification
- The account status notification to be processed.
-