Fix modules Restconf call for mounted devices
[controller.git] / opendaylight / md-sal / sal-dom-api / src / main / java / org / opendaylight / controller / sal / core / api / notify / NotificationPublishService.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.md.sal.dom.api.DOMService;
11 import org.opendaylight.yangtools.yang.data.api.CompositeNode;
12
13 /**
14  * Notification Publishing Service
15  *
16  * The simplified process of the notification publishing is following:
17  *
18  * <ol>
19  * <li> {@link org.opendaylight.controller.sal.core.api.Provider} invokes {@link #sendNotification(CompositeNode)}
20  * <li> {@link org.opendaylight.controller.sal.core.api.Broker} finds {@link NotificationListener}s which subscribed for
21  * the notification type.
22  *
23  * <li>For each subscriber {@link org.opendaylight.controller.sal.core.api.Broker} invokes
24  * {@link NotificationListener#onNotification(CompositeNode)}
25  * </ol>
26  */
27 public interface NotificationPublishService extends NotificationService, DOMService {
28     /**
29      * Publishes a notification.
30      *
31      * Notification type is determined by the
32      * {@link CompositeNode#getNodeType()} of the
33      * <code>notification<code> parameter.
34      *
35      * @param notification
36      *            Notification to publish
37      */
38     void publish(CompositeNode notification);
39 }