/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2005 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: SMSEventListenerManager.java,v 1.12 2009/01/28 05:35:03 ww203982 Exp $
*
* Portions Copyright 2015 ForgeRock AS.
*/
/**
* Receives notifications for all SMS object changes from
* <class>SMSNotificationManager</class> and dispatches the same to <class>
* CachedSMSEntry</class> and <class>CachedSubEntries</class>. This class
* also handles the case of sending deleted event for recursive deletes.
*/
// All Notification Objects list
// CachedSMSEntry objects
// CachedSubEntries objects
// Static Initialization variables
protected static boolean initialized;
if (!initialized) {
try {
if (SMSNotificationManager.isCacheEnabled()) {
}
if (debug.messageEnabled()) {
}
initialized = true;
} catch (Exception e) {
"Unable to intialize SMS listener: " + e);
}
}
}
// do nothing
}
// Processes object changed notifications
}
// Processes object changed notifications. The flag isLocal is used
// distingush the self generated DELETE notifications for recursive
// deletes, especially when data store notifications are disabled.
// In which case, delete notifications will never be generated.
if (debug.messageEnabled()) {
" type: " + event);
}
// Normalize the DN
// If event is delete, need to send notifications for sub-entries
// Even if backend datastore notification is enabled, they woould
// arrive much later causing write-through cache issues.
// Collect the immediate children of the current sdn
// from nodeChanges. All "subNodeChanges" entries would
// have an entry in "nodeChanges", hence donot have to
// iterate throught it
synchronized (nodeChanges) {
}
}
}
// Send the notifications
if (debug.messageEnabled()) {
}
// Send notifications to external listeners also if
// data store notification is not enabled
}
}
}
// Send notifications to CachedSMSEntries
// Process sub-entry changed events, not interested in attribute mods
// Send notifications to CachedSubEntries
if (debug.messageEnabled()) {
" sending notifications to its parents");
}
sendNotifications((Set) subNodeChanges.get(DN.valueOf(dn).parent().toString().toLowerCase()), odn, event);
}
}
public void allObjectsChanged() {
if (debug.messageEnabled()) {
}
// Collect all the DNs from "nodeChanges" and send notifications
synchronized (nodeChanges) {
}
}
// Send MODIFY notifications
}
}
/**
* Registers notification for changes to nodes
*/
}
/**
* Registers notification for changes to its sub-nodes
*/
Object o) {
}
/**
* Removes notification objects
*/
}
}
/**
* Adds notification method to the map
*/
synchronized (nChangesMap) {
}
}
nObjects);
}
/**
* Sends notification to methods and objects within the set
*/
return;
}
synchronized (nObjects) {
}
try {
// We do not cache Realm names.
// We cache only service names and policy names.
} else {
}
}
} else {
}
} catch (Exception e) {
"Unable to send notification: ", e);
}
}
}
private static class NotificationObject {
method = m;
object = o;
args = a;
set = s;
}
return (id);
}
// @Override
public int hashCode() {
int hash = 3;
return hash;
}
if (o instanceof NotificationObject) {
}
return (false);
}
}
}