2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
\r
4 * This program and the accompanying materials are made available under the
\r
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
\r
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
\r
8 package org.opendaylight.controller.sal.core.api.notify;
\r
10 import org.opendaylight.controller.sal.core.api.BrokerService;
\r
11 import org.opendaylight.controller.sal.core.api.Provider;
\r
12 import org.opendaylight.controller.sal.core.api.RpcImplementation;
\r
13 import org.opendaylight.controller.sal.core.api.Broker.ProviderSession;
\r
14 import org.opendaylight.controller.yang.common.QName;
\r
18 * NotificationService provides access to the notification functionality of the
\r
21 * NotificationService allows for consumption of notifications by registering
\r
22 * implementations of NotificationListener.
\r
24 * The registration of notification listeners could be done by:
\r
26 * <li>returning an instance of implementation in the return value of
\r
27 * {@link Provider#getProviderFunctionality()}
\r
28 * <li>passing an instance of implementation and {@link QName} of rpc as an
\r
30 * {@link ProviderSession#addRpcImplementation(QName, RpcImplementation)}
\r
35 public interface NotificationService extends BrokerService {
\r
38 * Registers a notification listener for supplied notification type.
\r
40 * @param notification
\r
43 void addNotificationListener(QName notification,
\r
44 NotificationListener listener);
\r
47 * Removes a notification listener for supplied notification type.
\r
49 * @param notification
\r
52 void removeNotificationListener(QName notification,
\r
53 NotificationListener listener);
\r