Merge "BUG-868: use a single version of ClassLoaderUtils"
[controller.git] / opendaylight / md-sal / sal-binding-api / src / main / java / org / opendaylight / controller / sal / binding / api / NotificationListener.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
12 import org.opendaylight.yangtools.yang.binding.Notification;
13
14 /**
15  * Interface implemented by objects interested in some sort of Notification. This
16  * class acts as a base interface for specific listeners which usually are a type
17  * capture of this interface.
18  *
19  * @param <T> Notification type
20  */
21 public interface NotificationListener<T extends Notification> extends EventListener {
22     /**
23      * Invoked to deliver the notification. Note that this method may be invoked
24      * from a shared thread pool, so implementations SHOULD NOT perform CPU-intensive
25      * operations and they definitely MUST NOT invoke any potentially blocking
26      * operations.
27      *
28      * @param notification Notification being delivered.
29      */
30     void onNotification(T notification);
31 }