001    /**
002     * <copyright>
003     *
004     * Copyright (c) 2002-2004 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: NotificationChain.java,v 1.3 2005/06/08 06:19:08 nickb Exp $
016     */
017    package org.eclipse.emf.common.notify;
018    
019    
020    /**
021     * An accumulator of notifications.
022     * As notifications are produced, 
023     * they are {@link #add accumulated} in a chain, 
024     * and possibly even merged, 
025     * before finally being {@link #dispatch dispatched} to the notifier.
026     */
027    public interface NotificationChain 
028    {
029      /**
030       * Adds a notification to the chain.
031       * @return whether the notification was added.
032       */
033      public boolean add(Notification notification);
034    
035      /**
036       * Dispatches each notification to the appropriate notifier via 
037       * {@link org.eclipse.emf.common.notify.Notifier#eNotify Notifier.eNotify}.
038       */
039      public void dispatch();
040    }