org.opends.server.api
Class AccountStatusNotificationHandler<T extends AccountStatusNotificationHandlerCfg>

java.lang.Object
  extended by org.opends.server.api.AccountStatusNotificationHandler<T>
Type Parameters:
T - The type of configuration handled by this notification handler.
Direct Known Subclasses:
ErrorLogAccountStatusNotificationHandler, SMTPAccountStatusNotificationHandler

@PublicAPI(stability=VOLATILE,
           mayInstantiate=false,
           mayExtend=true,
           mayInvoke=false)
public abstract class AccountStatusNotificationHandler<T extends AccountStatusNotificationHandlerCfg>
extends java.lang.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
AccountStatusNotificationHandler()
           
 
Method Summary
 void finalizeStatusNotificationHandler()
          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)
          Initializes this account status notification handler based on the information in the provided configuration entry.
 boolean isConfigurationAcceptable(AccountStatusNotificationHandlerCfg configuration, java.util.List<Message> unacceptableReasons)
          Indicates whether the provided configuration is acceptable for this account status notification handler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccountStatusNotificationHandler

public AccountStatusNotificationHandler()
Method Detail

initializeStatusNotificationHandler

public abstract void initializeStatusNotificationHandler(T configuration)
                                                  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.
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(AccountStatusNotificationHandlerCfg configuration,
                                         java.util.List<Message> 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.

Note that implementations which use a subclass of the provided configuration class will likely need to cast the configuration to the appropriate subclass type.

Parameters:
configuration - The account status notification handler configuration for which to make the determination.
unacceptableReasons - 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, or false if not.

finalizeStatusNotificationHandler

public void finalizeStatusNotificationHandler()
Performs any finalization that may be necessary when this status notification handler is taken out of service.


handleStatusNotification

public abstract void handleStatusNotification(AccountStatusNotification notification)
Performs any processing that may be necessary in conjunction with the provided account status notification.

Parameters:
notification - The account status notification to be processed.