org.opends.server.api
Interface ChangeNotificationListener

All Known Implementing Classes:
AciListenerManager, AuthenticatedUsers, CryptoManagerSync, GroupManager

@PublicAPI(stability=VOLATILE,
           mayInstantiate=false,
           mayExtend=true,
           mayInvoke=false)
public interface ChangeNotificationListener

This interface defines a mechanism that Directory Server components may use if they need to be notified of changes that are made in the Directory Server. Similar functionality can be achieved using post-response plugins, but this interface is better suited to core functionality that should not be considered optional, since plugins may be disabled. Further, change notification listeners will only be invoked for successful operations.

Each change notification listener will be notified whenever an update is made in the server (just before the response is sent to the client), so the listener should use a very efficient mechanism for determining whether or not any action is required for the associated operation and quickly return for cases in which the update is not applicable. Also note that even though the listener will be invoked before the response is sent to the client, it may not alter that response in any way and therefore the listener will be given what is essentially a read-only view of the associated operation.

Note that while this interface can be used by clients to be notified of changes to the configuration data just as easily as it can be used for any other entry anywhere in the server, components that are only interested in being notified of changes to the server configuration should use the ConfigAddListener, ConfigDeleteListener, and/or the ConfigChangeListener interfaces instead. They will be more efficient overall because they will only be invoked for operations in the server configuration, and then only for the specific entries with which the component has registered.


Method Summary
 void handleAddOperation(PostResponseAddOperation addOperation, Entry entry)
          Performs any processing that may be required after an add operation.
 void handleDeleteOperation(PostResponseDeleteOperation deleteOperation, Entry entry)
          Performs any processing that may be required after a delete operation.
 void handleModifyDNOperation(PostResponseModifyDNOperation modifyDNOperation, Entry oldEntry, Entry newEntry)
          Performs any processing that may be required after a modify DN operation.
 void handleModifyOperation(PostResponseModifyOperation modifyOperation, Entry oldEntry, Entry newEntry)
          Performs any processing that may be required after a modify operation.
 

Method Detail

handleAddOperation

void handleAddOperation(PostResponseAddOperation addOperation,
                        Entry entry)
Performs any processing that may be required after an add operation.

Parameters:
addOperation - The add operation that was performed in the server.
entry - The entry that was added to the server.

handleDeleteOperation

void handleDeleteOperation(PostResponseDeleteOperation deleteOperation,
                           Entry entry)
Performs any processing that may be required after a delete operation.

Parameters:
deleteOperation - The delete operation that was performed in the server.
entry - The entry that was removed from the server.

handleModifyOperation

void handleModifyOperation(PostResponseModifyOperation modifyOperation,
                           Entry oldEntry,
                           Entry newEntry)
Performs any processing that may be required after a modify operation.

Parameters:
modifyOperation - The modify operation that was performed in the server.
oldEntry - The entry before it was updated.
newEntry - The entry after it was updated.

handleModifyDNOperation

void handleModifyDNOperation(PostResponseModifyDNOperation modifyDNOperation,
                             Entry oldEntry,
                             Entry newEntry)
Performs any processing that may be required after a modify DN operation.

Parameters:
modifyDNOperation - The modify DN operation that was performed in the server.
oldEntry - The entry before it was updated.
newEntry - The entry after it was updated.