Devices dashlet show port total numbers, modal shows collapsible list
[controller.git] / opendaylight / sal / yang-prototype / sal / sal-core-api / src / main / java / org / opendaylight / controller / sal / core / api / notify / NotificationListener.java
1 /*\r
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
3  *\r
4  * This program and the accompanying materials are made available under the\r
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
6  * and is available at http://www.eclipse.org/legal/epl-v10.html\r
7  */\r
8 package org.opendaylight.controller.sal.core.api.notify;\r
9 \r
10 import java.util.Set;\r
11 \r
12 import org.opendaylight.controller.sal.core.api.Consumer;\r
13 import org.opendaylight.controller.yang.common.QName;\r
14 import org.opendaylight.controller.yang.data.api.CompositeNode;\r
15 \r
16 \r
17 /**\r
18  * Notification listener for SAL notifications.\r
19  */\r
20 public interface NotificationListener extends Consumer.ConsumerFunctionality {\r
21     /**\r
22      * A set of notification types supported by listeners.\r
23      * \r
24      * The set of notification {@link QName}s which are supported by this\r
25      * listener. This set is used, when {@link Consumer} is registered to the\r
26      * SAL, to automatically register the listener.\r
27      * \r
28      * @return Set of QNames identifying supported notifications.\r
29      */\r
30     Set<QName> getSupportedNotifications();\r
31 \r
32     /**\r
33      * Fired when the notification occurs.\r
34      * \r
35      * The type of the notification could be learned by\r
36      * <code>QName type = notification.getNodeType();</code>\r
37      * \r
38      * @param notification\r
39      *            Notification content\r
40      */\r
41     void onNotification(CompositeNode notification);\r
42 }\r