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 * Portions Copyright 2015 ForgeRock AS. 028 */ 029 030package com.iplanet.services.ldap.event; 031 032import java.util.EventListener; 033import java.util.Map; 034 035import org.forgerock.opendj.ldap.controls.PersistentSearchChangeType; 036 037/** 038 * The purpose of this interface is to allow classes that implement this 039 * interface to listen to Directory Server Events. 040 * @supported.api 041 */ 042public interface IDSEventListener extends EventListener { 043 044 /** 045 * This callback method is called by the EventService when the Directory 046 * Server triggers a PersistentSearch notification 047 * @supported.api 048 */ 049 public void entryChanged(DSEvent e); 050 051 /** 052 * This callback method is called by the EventService when an error is 053 * encountered after setting a Persistent Search request in the Directory 054 * Server 055 * @supported.api 056 */ 057 public void eventError(String err); 058 059 /** 060 * This callback notifies listeners that EventService is restarting the 061 * Persistent Search connections due to connection errors, and there is no 062 * guarantee of what could have changed in the directory so mark all entries 063 * as modified. 064 */ 065 public void allEntriesChanged(); 066 067 public static int CHANGE_ADD = PersistentSearchChangeType.ADD.intValue(); 068 069 public static int CHANGE_DELETE = PersistentSearchChangeType.DELETE.intValue(); 070 071 public static int CHANGE_MOD_LOCATION = PersistentSearchChangeType.MODIFY_DN.intValue(); 072 073 public static int CHANGE_MODIFY = PersistentSearchChangeType.MODIFY.intValue(); 074 075 public String getBase(); 076 077 public String getFilter(); 078 079 public int getScope(); 080 081 public int getOperations(); 082 083 public void setListeners(Map listener); 084 085}