0N/A/*
0N/A * CDDL HEADER START
0N/A *
0N/A * The contents of this file are subject to the terms of the
0N/A * Common Development and Distribution License, Version 1.0 only
0N/A * (the "License"). You may not use this file except in compliance
0N/A * with the License.
0N/A *
0N/A * You can obtain a copy of the license at
0N/A * trunk/opends/resource/legal-notices/OpenDS.LICENSE
0N/A * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
0N/A * See the License for the specific language governing permissions
0N/A * and limitations under the License.
0N/A *
0N/A * When distributing Covered Code, include this CDDL HEADER in each
0N/A * file and include the License file at
0N/A * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
0N/A * add the following below this CDDL HEADER, with the fields enclosed
873N/A * by brackets "[]" replaced with your own identifying information:
0N/A * Portions Copyright [yyyy] [name of copyright owner]
0N/A *
0N/A * CDDL HEADER END
0N/A *
0N/A *
3215N/A * Copyright 2006-2008 Sun Microsystems, Inc.
0N/A */
0N/Apackage org.opends.server.api;
0N/A
0N/A
0N/A
0N/Aimport org.opends.server.types.Entry;
758N/Aimport org.opends.server.types.operation.PostResponseAddOperation;
758N/Aimport org.opends.server.types.operation.PostResponseDeleteOperation;
758N/Aimport org.opends.server.types.operation.PostResponseModifyOperation;
758N/Aimport org.opends.server.types.operation.
758N/A PostResponseModifyDNOperation;
0N/A
0N/A
0N/A
0N/A/**
0N/A * This interface defines a mechanism that Directory Server components
0N/A * may use if they need to be notified of changes that are made in the
0N/A * Directory Server. Similar functionality can be achieved using
0N/A * post-response plugins, but this interface is better suited to core
0N/A * functionality that should not be considered optional, since plugins
0N/A * may be disabled. Further, change notification listeners will only
0N/A * be invoked for successful operations.
0N/A * <BR><BR>
0N/A * Each change notification listener will be notified whenever an
758N/A * update is made in the server (just before the response is sent to
758N/A * the client), so the listener should use a very efficient mechanism
758N/A * for determining whether or not any action is required for the
758N/A * associated operation and quickly return for cases in which the
758N/A * update is not applicable. Also note that even though the listener
758N/A * will be invoked before the response is sent to the client, it may
758N/A * not alter that response in any way and therefore the listener will
758N/A * be given what is essentially a read-only view of the associated
758N/A * operation.
0N/A * <BR><BR>
0N/A * Note that while this interface can be used by clients to be
0N/A * notified of changes to the configuration data just as easily as it
0N/A * can be used for any other entry anywhere in the server, components
0N/A * that are only interested in being notified of changes to the server
2095N/A * configuration should use the {@code ConfigAddListener},
2095N/A * {@code ConfigDeleteListener}, and/or the
2095N/A * {@code ConfigChangeListener} interfaces instead. They will be more
2095N/A * efficient overall because they will only be invoked for operations
2095N/A * in the server configuration, and then only for the specific entries
2095N/A * with which the component has registered.
0N/A */
2095N/A@org.opends.server.types.PublicAPI(
2095N/A stability=org.opends.server.types.StabilityLevel.VOLATILE,
2095N/A mayInstantiate=false,
2095N/A mayExtend=true,
2095N/A mayInvoke=false)
0N/Apublic interface ChangeNotificationListener
0N/A{
0N/A /**
0N/A * Performs any processing that may be required after an add
0N/A * operation.
0N/A *
0N/A * @param addOperation The add operation that was performed in the
0N/A * server.
0N/A * @param entry The entry that was added to the server.
0N/A */
758N/A public void handleAddOperation(
758N/A PostResponseAddOperation addOperation,
758N/A Entry entry);
0N/A
0N/A
0N/A
0N/A /**
0N/A * Performs any processing that may be required after a delete
0N/A * operation.
0N/A *
0N/A * @param deleteOperation The delete operation that was performed
0N/A * in the server.
0N/A * @param entry The entry that was removed from the
0N/A * server.
0N/A */
758N/A public void handleDeleteOperation(
758N/A PostResponseDeleteOperation deleteOperation,
758N/A Entry entry);
0N/A
0N/A
0N/A
0N/A /**
0N/A * Performs any processing that may be required after a modify
0N/A * operation.
0N/A *
0N/A * @param modifyOperation The modify operation that was performed
0N/A * in the server.
0N/A * @param oldEntry The entry before it was updated.
0N/A * @param newEntry The entry after it was updated.
0N/A */
758N/A public void handleModifyOperation(
758N/A PostResponseModifyOperation modifyOperation,
758N/A Entry oldEntry, Entry newEntry);
0N/A
0N/A
0N/A
0N/A /**
0N/A * Performs any processing that may be required after a modify DN
0N/A * operation.
0N/A *
0N/A * @param modifyDNOperation The modify DN operation that was
0N/A * performed in the server.
0N/A * @param oldEntry The entry before it was updated.
0N/A * @param newEntry The entry after it was updated.
0N/A */
0N/A public void handleModifyDNOperation(
758N/A PostResponseModifyDNOperation modifyDNOperation,
0N/A Entry oldEntry, Entry newEntry);
0N/A}
0N/A