51871a770be06eb8e33c061d7e792f06339398fa
[controller.git] / opendaylight / md-sal / sal-dom-api / src / main / java / org / opendaylight / controller / sal / core / api / notify / NotificationProviderService.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.controller.sal.core.api.notify;
9
10 import org.opendaylight.controller.sal.core.api.Broker;
11 import org.opendaylight.controller.sal.core.api.Provider;
12 import org.opendaylight.yangtools.yang.data.api.CompositeNode;
13
14
15 /**
16  * Notification Publishing Service
17  * 
18  * The simplified process of the notification publishing is following:
19  * 
20  * <ol>
21  * <li> {@link Provider} invokes {@link #sendNotification(CompositeNode)}
22  * <li> {@link Broker} finds {@link NotificationListener}s which subscribed for
23  * the notification type.
24  * 
25  * <li>For each subscriber {@link Broker} invokes
26  * {@link NotificationListener#onNotification(CompositeNode)}
27  * </ol>
28  * 
29  * 
30  * 
31  */
32 public interface NotificationProviderService extends NotificationService {
33
34     /**
35      * Publishes a notification.
36      * 
37      * Notification type is determined by the
38      * {@link CompositeNode#getNodeType()} of the
39      * <code>notification<code> parameter.
40      * 
41      * @param notification
42      *            Notification to publish
43      */
44     void sendNotification(CompositeNode notification);
45
46 }