2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
\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
8 package org.opendaylight.controller.sal.core.api.notify;
\r
10 import java.util.Set;
\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
18 * Notification listener for SAL notifications.
\r
20 public interface NotificationListener extends Consumer.ConsumerFunctionality {
\r
22 * A set of notification types supported by listeners.
\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
28 * @return Set of QNames identifying supported notifications.
\r
30 Set<QName> getSupportedNotifications();
\r
33 * Fired when the notification occurs.
\r
35 * The type of the notification could be learned by
\r
36 * <code>QName type = notification.getNodeType();</code>
\r
38 * @param notification
\r
39 * Notification content
\r
41 void onNotification(CompositeNode notification);
\r