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.binding.api;
10 import java.util.EventListener;
11 import java.util.concurrent.ExecutorService;
13 import org.opendaylight.controller.md.sal.common.api.notify.NotificationPublishService;
14 import org.opendaylight.yangtools.concepts.ListenerRegistration;
15 import org.opendaylight.yangtools.concepts.Registration;
16 import org.opendaylight.yangtools.yang.binding.Notification;
18 public interface NotificationProviderService extends NotificationService, NotificationPublishService<Notification> {
22 * Deprecated. Use {@link #publish(Notification)}.
27 void notify(Notification notification);
30 * Deprecated. Use {@link #publish(Notification,ExecutorService)}.
35 void notify(Notification notification, ExecutorService service);
38 * Publishes a notification.
41 * notification to publish.
45 void publish(Notification notification);
48 * Publishes a notification, listener calls are done in provided executor.
52 void publish(Notification notification, ExecutorService service);
54 ListenerRegistration<NotificationInterestListener> registerInterestListener(
55 NotificationInterestListener interestListener);
57 public interface NotificationInterestListener extends EventListener {
59 void onNotificationSubscribtion(Class<? extends Notification> notificationType);