2 * Copyright (c) 2014 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.impl;
10 import org.opendaylight.controller.sal.binding.api.NotificationListener;
11 import org.opendaylight.yangtools.concepts.ListenerRegistration;
12 import org.opendaylight.yangtools.yang.binding.Notification;
15 * A registration of a {@link NotificationListener}. Allows query of the type
16 * of the notification and dispatching the notification atomically with regard
19 * @param <T> Type of notification
21 interface NotificationListenerRegistration<T extends Notification> extends ListenerRegistration<NotificationListener<T>> {
23 * Return the interface class of the notification type.
25 * @return Notification type.
27 Class<? extends Notification> getType();
30 * Dispatch a notification to the listener.
32 * @param notification Notification to be dispatched
34 void notify(Notification notification);