001/** 002 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 003 * 004 * Copyright (c) 2005 Sun Microsystems Inc. All Rights Reserved 005 * 006 * The contents of this file are subject to the terms 007 * of the Common Development and Distribution License 008 * (the License). You may not use this file except in 009 * compliance with the License. 010 * 011 * You can obtain a copy of the License at 012 * https://opensso.dev.java.net/public/CDDLv1.0.html or 013 * opensso/legal/CDDLv1.0.txt 014 * See the License for the specific language governing 015 * permission and limitations under the License. 016 * 017 * When distributing Covered Code, include this CDDL 018 * Header Notice in each file and include the License file 019 * at opensso/legal/CDDLv1.0.txt. 020 * If applicable, add the following below the CDDL Header, 021 * with the fields enclosed by brackets [] replaced by 022 * your own identifying information: 023 * "Portions Copyrighted [year] [name of copyright owner]" 024 * 025 * $Id: IDSEventListener.java,v 1.4 2009/01/28 05:34:50 ww203982 Exp $ 026 * 027 */ 028 029package com.iplanet.services.ldap.event; 030 031import java.util.EventListener; 032import java.util.Map; 033 034import com.sun.identity.shared.ldap.controls.LDAPPersistSearchControl; 035 036/** 037 * The purpose of this interface is to allow classes that implement this 038 * interface to listen to Directory Server Events. 039 * @supported.api 040 */ 041public interface IDSEventListener extends EventListener { 042 043 /** 044 * This callback method is called by the EventService when the Directory 045 * Server triggers a PersistentSearch notification 046 * @supported.api 047 */ 048 public void entryChanged(DSEvent e); 049 050 /** 051 * This callback method is called by the EventService when an error is 052 * encountered after setting a Persistent Search request in the Directory 053 * Server 054 * @supported.api 055 */ 056 public void eventError(String err); 057 058 /** 059 * This callback notifies listeners that EventService is restarting the 060 * Persistent Search connections due to connection errors, and there is no 061 * guarantee of what could have changed in the directory so mark all entries 062 * as modified. 063 */ 064 public void allEntriesChanged(); 065 066 public static int CHANGE_ADD = LDAPPersistSearchControl.ADD; 067 068 public static int CHANGE_DELETE = LDAPPersistSearchControl.DELETE; 069 070 public static int CHANGE_MOD_LOCATION = LDAPPersistSearchControl.MODDN; 071 072 public static int CHANGE_MODIFY = LDAPPersistSearchControl.MODIFY; 073 074 public String getBase(); 075 076 public String getFilter(); 077 078 public int getScope(); 079 080 public int getOperations(); 081 082 public void setListeners(Map listener); 083 084}