2 * Copyright (c) 2004 World Wide Web Consortium, (Massachusetts Institute of
3 * Technology, Institut National de Recherche en Informatique et en
4 * Automatique, Keio University). All Rights Reserved. This program is
5 * distributed under the W3C's Software Intellectual Property License. This
6 * program is distributed in the hope that it will be useful, but WITHOUT ANY
7 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
8 * FOR A PARTICULAR PURPOSE. See W3C License
9 * http://www.w3.org/Consortium/Legal/ for more details.
12 package org.w3c.domts;
14 import java.util.ArrayList;
15 import java.util.List;
17 import org.w3c.dom.Node;
18 import org.w3c.dom.UserDataHandler;
21 * This is a utility implementation of UserDataHandler that captures all
24 public class UserDataMonitor
25 implements UserDataHandler {
26 private final List notifications = new ArrayList();
32 public UserDataMonitor() {
36 * Implementation of UserDataHandler.handle. Creates a UserDataNotification
40 * See org.w3c.dom.UserDataHandler
42 * See org.w3c.dom.UserDataHandler
44 * See org.w3c.dom.UserDataHandler
46 * See org.w3c.dom.UserDataHandler
48 * See org.w3c.dom.UserDataHandler
57 new UserDataNotification(operation, key, data, src, dst));
61 * Gets list of notifications
63 * @return List of notifications, may not be null.
65 public final List getAllNotifications() {
66 return new ArrayList(notifications);