Listening for responses from the Unified Search Service

When you manipulate content with AppContentManager methods, you should specify class that implements the AppContentListener interface. After the Unified Search Service has processed your request, it notifies the AppContentListener method that corresponds to the operation that you requested.

Each AppContentManager method has a parameter that tells you how many objects were affected by the operation. If the operation fails, the value of the parameter is 0.

Code sample: Implementing the AppContentListener interface

public class MyListener implements AppContentListener {

    public void onDeleteComplete(int delCount) {
        // Action to take after records deleted.

    public void onInsertComplete(int insertCount) {
        // Action to take after new records inserted.

    public void onUpdateComplete(int updCount) {
        // Action to take after records updated.

Was this information helpful? Send us your comments.