2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.controller.sal.core.api.notify;
12 import org.opendaylight.controller.sal.core.api.Consumer;
13 import org.opendaylight.yangtools.yang.common.QName;
14 import org.opendaylight.yangtools.yang.data.api.CompositeNode;
18 * Notification listener for SAL notifications.
20 public interface NotificationListener extends Consumer.ConsumerFunctionality {
22 * A set of notification types supported by listeners.
24 * The set of notification {@link QName}s which are supported by this
25 * listener. This set is used, when {@link Consumer} is registered to the
26 * SAL, to automatically register the listener.
28 * @return Set of QNames identifying supported notifications.
30 Set<QName> getSupportedNotifications();
33 * Fired when the notification occurs.
35 * The type of the notification could be learned by
36 * <code>QName type = notification.getNodeType();</code>
39 * Notification content
41 void onNotification(CompositeNode notification);