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;
12 import org.opendaylight.yangtools.yang.binding.Notification;
15 * Interface for a generic listener that is interested in receiving YANG modeled notifications.
16 * This interface acts as a base interface for specific listeners which usually are a type
17 * capture of this interface.
19 * @param <T> the interested notification type
21 public interface NotificationListener<T extends Notification> extends EventListener {
23 * Invoked to deliver a notification.
25 * Note that this method may be invoked from a shared thread pool, so implementations SHOULD NOT
26 * perform CPU-intensive operations and MUST NOT invoke any potentially blocking operations.
28 * @param notification the notification.
30 void onNotification(T notification);