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