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      *
16      * Deprecated: use {@link #addNotificationListener(Class, NotificationListener)} istead.
17      *
18      * @param listener
19      */
20     @Deprecated
21     <T extends Notification> void addNotificationListener(Class<T> notificationType, NotificationListener<T> listener);
22
23     /**
24      *
25      * Deprecated: use {@link #addNotificationListener(org.opendaylight.yangtools.yang.binding.NotificationListener)} istead.
26      *
27      * @param listener
28      */
29     @Deprecated
30     void addNotificationListener(org.opendaylight.yangtools.yang.binding.NotificationListener listener);
31
32     /**
33      * Deprecated: use {@link Registration#close()} istead.
34      * @param listener
35      */
36     @Deprecated
37     void removeNotificationListener(org.opendaylight.yangtools.yang.binding.NotificationListener listener);
38
39     /**
40      * Deprecated: use {@link Registration#close()} istead.
41      * @param listener
42      */
43     @Deprecated
44     <T extends Notification> void removeNotificationListener(Class<T> notificationType, NotificationListener<T> listener);
45
46
47     /**
48      * Register a generic listener for specified notification type only.
49      *
50      * @param notificationType
51      * @param listener
52      * @return Registration for listener. To unregister listener invoke {@link Registration#close()} method.
53      */
54     <T extends Notification> Registration<NotificationListener<T>> registerNotificationListener(
55             Class<T> notificationType, NotificationListener<T> listener);
56
57
58     /**
59      * Register a listener which implements generated notification interfaces derived from
60      * {@link org.opendaylight.yangtools.yang.binding.NotificationListener}.
61      * Listener is registered for all notifications present in implemented interfaces.
62      *
63      * @param listener
64      * @return Registration for listener. To unregister listener invoke {@link Registration#close()} method.
65      */
66     Registration<org.opendaylight.yangtools.yang.binding.NotificationListener> registerNotificationListener(
67             org.opendaylight.yangtools.yang.binding.NotificationListener listener);
68 }