Merge "Fixed for bug : 1171 - issue while creating subnet"
[controller.git] / opendaylight / md-sal / sal-dom-api / src / main / java / org / opendaylight / controller / sal / core / api / notify / NotificationService.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.core.api.notify;
9
10 import org.opendaylight.controller.sal.core.api.BrokerService;
11 import org.opendaylight.yangtools.concepts.ListenerRegistration;
12 import org.opendaylight.yangtools.yang.common.QName;
13
14
15 /**
16  * NotificationService provides access to the notification functionality of the
17  * SAL.
18  *
19  * NotificationService allows for consumption of notifications by registering
20  * implementations of NotificationListener.
21  *
22  * The registration of notification listeners could be done by:
23  * <ul>
24  * <li>returning an instance of implementation in the return value of
25  * {@link org.opendaylight.controller.sal.core.api.Provider#getProviderFunctionality()}
26  * <li>passing an instance of implementation and {@link QName} of an RPC as an
27  * argument to
28  * {@link org.opendaylight.controller.sal.core.api.Broker.ProviderSession#addRpcImplementation(QName, org.opendaylight.controller.sal.core.api.RpcImplementation)}
29  * </ul>
30  *
31  *
32  */
33 public interface NotificationService extends BrokerService {
34
35     /**
36      * Registers a notification listener for supplied notification type.
37      *
38      * @param notification
39      * @param listener
40      */
41     ListenerRegistration<NotificationListener> addNotificationListener(QName notification,
42             NotificationListener listener);
43 }