/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at legal-notices/CDDLv1_0.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information:
* Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Copyright 2008 Sun Microsystems, Inc.
* Portions Copyright 2014-2015 ForgeRock AS
*/
/**
* This class implements a Directory Server alert handler that only provides a
* mechanism to determine the number of times it is invoked.
*/
public class DummyAlertHandler
implements AlertHandler<AlertHandlerCfg>,
{
/** The current configuration for this alert handler. */
/** The number of times this alert handler has been invoked. */
/** Creates a new instance of this SMTP alert handler. */
public DummyAlertHandler()
{
super();
// All initialization should be done in the initializeAlertHandler method.
}
/** {@inheritDoc} */
{
configuration.addChangeListener(this);
}
/** {@inheritDoc} */
{
return currentConfig;
}
/** {@inheritDoc} */
{
return true;
}
/** {@inheritDoc} */
public void finalizeAlertHandler()
{
// No action is required.
}
/** {@inheritDoc} */
{
}
/**
* Retrieves the number of times that this alert handler has been invoked.
*
* @return The number of times that this alert handler has been invoked.
*/
public static int getAlertCount()
{
return alertCount.get();
}
/** {@inheritDoc} */
{
return true;
}
/** {@inheritDoc} */
{
return new ConfigChangeResult();
}
}