Topology Manager to avoid redundant edge updates
[controller.git] / opendaylight / md-sal / sal-binding-api / src / main / java / org / opendaylight / controller / sal / binding / api / NotificationProviderService.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 java.util.EventListener;
11 import java.util.concurrent.ExecutorService;
12
13 import org.opendaylight.controller.md.sal.common.api.notify.NotificationPublishService;
14 import org.opendaylight.yangtools.concepts.ListenerRegistration;
15 import org.opendaylight.yangtools.yang.binding.Notification;
16
17 public interface NotificationProviderService extends NotificationService, NotificationPublishService<Notification> {
18
19
20     /**
21      * Deprecated. Use {@link #publish(Notification)}.
22      *
23      * @param notification
24      */
25     @Deprecated
26     void notify(Notification notification);
27
28     /**
29      * Deprecated. Use {@link #publish(Notification,ExecutorService)}.
30      *
31      * @param notification
32      */
33     @Deprecated
34     void notify(Notification notification, ExecutorService service);
35
36     /**
37      * Publishes a notification.
38      *
39      * @param Notification
40      *            notification to publish.
41      *
42      */
43     @Override
44     void publish(Notification notification);
45
46     /**
47      * Publishes a notification, listener calls are done in provided executor.
48      *
49      */
50     @Override
51     void publish(Notification notification, ExecutorService service);
52
53     ListenerRegistration<NotificationInterestListener> registerInterestListener(
54             NotificationInterestListener interestListener);
55
56     public interface NotificationInterestListener extends EventListener {
57
58         void onNotificationSubscribtion(Class<? extends Notification> notificationType);
59     }
60 }