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 org.opendaylight.yangtools.concepts.ListenerRegistration;
11 import org.opendaylight.yangtools.yang.binding.Notification;
13 public interface NotificationService extends BindingAwareService {
15 * Register a generic listener for specified notification type only.
17 * @param notificationType
19 * @return Registration for listener. To unregister listener invoke {@link ListenerRegistration#close()} method.
21 <T extends Notification> ListenerRegistration<NotificationListener<T>> registerNotificationListener(
22 Class<T> notificationType, NotificationListener<T> listener);
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.
30 * @return Registration for listener. To unregister listener invoke {@link ListenerRegistration#close()} method.
32 ListenerRegistration<org.opendaylight.yangtools.yang.binding.NotificationListener> registerNotificationListener(
33 org.opendaylight.yangtools.yang.binding.NotificationListener listener);