001 /**
002 * <copyright>
003 *
004 * Copyright (c) 2002-2006 IBM Corporation and others.
005 * All rights reserved. This program and the accompanying materials
006 * are made available under the terms of the Eclipse Public License v1.0
007 * which accompanies this distribution, and is available at
008 * http://www.eclipse.org/legal/epl-v10.html
009 *
010 * Contributors:
011 * IBM - Initial API and implementation
012 *
013 * </copyright>
014 *
015 * $Id: Notifier.java,v 1.3 2006/12/05 20:19:54 emerks Exp $
016 */
017 package org.eclipse.emf.common.notify;
018
019
020 import org.eclipse.emf.common.util.EList;
021
022 /**
023 * A source of notification delivery.
024 * Since all modeled objects will be notifiers,
025 * the method names start with "e" to distinguish the EMF methods
026 * from the client's methods.
027 */
028 public interface Notifier
029 {
030 /**
031 * Returns list of the adapters associated with this notifier.
032 * @return the adapters associated with this notifier.
033 */
034 EList<Adapter> eAdapters();
035
036 /**
037 * Returns whether this notifier will deliver notifications to the adapters.
038 * @return whether notifications will be delivered.
039 * @see #eSetDeliver
040 */
041 boolean eDeliver();
042
043 /**
044 * Sets whether this notifier will deliver notifications to the adapters.
045 * @param deliver whether or not to deliver.
046 * @see #eDeliver()
047 */
048 void eSetDeliver(boolean deliver);
049
050 /**
051 * Notifies a change to a feature of this notifier as described by the notification.
052 * The notifications will generally be {@link #eDeliver() delivered}
053 * to the {@link #eAdapters adapters}
054 * via {@link Adapter#notifyChanged Adapter.notifyChanged}.
055 * @param notification a description of the change.
056 */
057 void eNotify(Notification notification);
058 }