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;
10 import java.util.EventListener;
13 import org.opendaylight.controller.sal.core.api.Consumer;
14 import org.opendaylight.yangtools.yang.common.QName;
15 import org.opendaylight.yangtools.yang.data.api.CompositeNode;
19 * Notification listener for SAL notifications.
21 public interface NotificationListener extends Consumer.ConsumerFunctionality, EventListener {
23 * A set of notification types supported by listeners.
25 * The set of notification {@link QName}s which are supported by this
26 * listener. This set is used, when {@link Consumer} is registered to the
27 * SAL, to automatically register the listener.
29 * @return Set of QNames identifying supported notifications.
31 Set<QName> getSupportedNotifications();
34 * Fired when the notification occurs.
36 * The type of the notification could be learned by
37 * <code>QName type = notification.getNodeType();</code>
40 * Notification content
42 void onNotification(CompositeNode notification);