Skip to content

Package: NotificationProvider

NotificationProvider

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2015 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * Jonas - initial API and implementation
13: * Johannes Faltermeier - initial API and implementation
14: ******************************************************************************/
15: package org.eclipse.emf.ecp.changebroker.spi;
16:
17: /**
18: * A notification provider is a source for {@link org.eclipse.emf.common.notify.Notification Notifications}. It
19: * maintains a set of {@link NotificationReceiver NotificationReceivers} which will be notified when there is a new
20: * Notification.
21: *
22: * @author Jonas
23: * @author jfaltermeier
24: *
25: */
26: public interface NotificationProvider {
27:
28:         /**
29:          * Adds a new {@link NotificationReceiver}. Does nothing of receiver is already registered,
30:          *
31:          * @param receiver the receiver to add
32:          */
33:         void addReceiver(NotificationReceiver receiver);
34:
35:         /**
36:          * Removes a {@link NotificationReceiver}. Does nothing if the receiver was
37:          * never registered.
38:          *
39:          * @param receiver the receiver
40:          */
41:         void removeReceiver(NotificationReceiver receiver);
42:
43: }