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