X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=opendaylight%2Fmd-sal%2Fsal-binding-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fbinding%2Fapi%2FNotificationListener.java;h=dd454c66207f5012f83f5f8426ec33b0dc6c2ff3;hb=a25503c13d9dc46fc7064a51ed139dccb87361f4;hp=ccc73919b66ae440e43956d26517d90bc97778e0;hpb=6b64494fd8e4654a298312afb4b8e6e827b75d5d;p=controller.git diff --git a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationListener.java b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationListener.java index ccc73919b6..dd454c6620 100644 --- a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationListener.java +++ b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationListener.java @@ -1,6 +1,31 @@ +/* + * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ package org.opendaylight.controller.sal.binding.api; -public interface NotificationListener { +import java.util.EventListener; +import org.opendaylight.yangtools.yang.binding.Notification; + +/** + * Interface implemented by objects interested in some sort of Notification. This + * class acts as a base interface for specific listeners which usually are a type + * capture of this interface. + * + * @param Notification type + */ +public interface NotificationListener extends EventListener { + /** + * Invoked to deliver the notification. Note that this method may be invoked + * from a shared thread pool, so implementations SHOULD NOT perform CPU-intensive + * operations and they definitely MUST NOT invoke any potentially blocking + * operations. + * + * @param notification Notification being delivered. + */ void onNotification(T notification); }