Merge "Topology Manager to avoid redundant edge updates"
[controller.git] / opendaylight / md-sal / sal-binding-api / src / main / java / org / opendaylight / controller / sal / binding / api / NotificationService.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.binding.api;
9
10 import org.opendaylight.yangtools.concepts.Registration;
11 import org.opendaylight.yangtools.yang.binding.Notification;
12
13 public interface NotificationService extends BindingAwareService {
14     /**
15      * Register a generic listener for specified notification type only.
16      *
17      * @param notificationType
18      * @param listener
19      * @return Registration for listener. To unregister listener invoke {@link Registration#close()} method.
20      */
21     <T extends Notification> Registration<NotificationListener<T>> registerNotificationListener(
22             Class<T> notificationType, NotificationListener<T> listener);
23
24     /**
25      * Register a listener which implements generated notification interfaces derived from
26      * {@link org.opendaylight.yangtools.yang.binding.NotificationListener}.
27      * Listener is registered for all notifications present in implemented interfaces.
28      *
29      * @param listener
30      * @return Registration for listener. To unregister listener invoke {@link Registration#close()} method.
31      */
32     Registration<org.opendaylight.yangtools.yang.binding.NotificationListener> registerNotificationListener(
33             org.opendaylight.yangtools.yang.binding.NotificationListener listener);
34 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.