KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > emf > common > notify > Notifier


1 /**
2  * <copyright>
3  *
4  * Copyright (c) 2002-2004 IBM Corporation and others.
5  * All rights reserved. This program and the accompanying materials
6  * are made available under the terms of the Eclipse Public License v1.0
7  * which accompanies this distribution, and is available at
8  * http://www.eclipse.org/legal/epl-v10.html
9  *
10  * Contributors:
11  * IBM - Initial API and implementation
12  *
13  * </copyright>
14  *
15  * $Id: Notifier.java,v 1.2 2005/06/08 06:19:08 nickb Exp $
16  */

17 package org.eclipse.emf.common.notify;
18
19
20 import org.eclipse.emf.common.util.EList;
21
22 /**
23  * A source of notification delivery.
24  * Since all modeled objects will be notifiers,
25  * the method names start with "e" to distinguish the EMF methods
26  * from the client's methods.
27  */

28 public interface Notifier
29 {
30   /**
31    * Returns list of the adapters associated with this notifier.
32    * @return the adapters associated with this notifier.
33    */

34   EList eAdapters();
35
36   /**
37    * Returns whether this notifier will deliver notifications to the adapters.
38    * @return whether notifications will be delivered.
39    * @see #eSetDeliver
40    */

41   boolean eDeliver();
42
43   /**
44    * Sets whether this notifier will deliver notifications to the adapters.
45    * @param deliver whether or not to deliver.
46    * @see #eDeliver()
47    */

48   void eSetDeliver(boolean deliver);
49
50   /**
51    * Notifies a change to a feature of this notifier as described by the notification.
52    * The notifications will generally be {@link #eDeliver() delivered}
53    * to the {@link #eAdapters adapters}
54    * via {@link Adapter#notifyChanged Adapter.notifyChanged}.
55    * @param notification a description of the change.
56    */

57   void eNotify(Notification notification);
58 }
59
Popular Tags