/*
* 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
* 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
* trunk/opends/resource/legal-notices/OpenDS.LICENSE. 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.
*/
/**
* This class is used to create and object that can
* register in the admin framework as a listener for changes, add and delete
* on the ReplicationServer configuration objects.
*
*/
public class ReplicationServerListener
implements ConfigurationAddListener<ReplicationServerCfg>,
{
/**
* Build a ReplicationServer Listener from the given Multimaster
* configuration.
*
* @param configuration The configuration that will be used to listen
* for replicationServer configuration changes.
*
* @throws ConfigException if the ReplicationServerListener can't register for
* listening to changes on the provided configuration
* object.
*/
public ReplicationServerListener(
throws ConfigException
{
{
}
}
/**
* {@inheritDoc}
*/
{
try
{
} catch (ConfigException e)
{
// we should never get to this point because the configEntry has
// already been validated in configAddisAcceptable
}
}
/**
* {@inheritDoc}
*/
public boolean isConfigurationAddAcceptable(
{
}
/**
* Shutdown the replication server.
*/
public void shutdown()
{
if (replicationServer != null)
}
/**
* {@inheritDoc}
*/
{
// There can be only one replicationServer, just shutdown the
// replicationServer currently configured.
if (replicationServer != null)
{
}
}
/**
* {@inheritDoc}
*/
public boolean isConfigurationDeleteAcceptable(
{
return true;
}
/**
* Returns the associated Replication Server.
* @return The replication server.
*/
{
return replicationServer;
}
}