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.core.api.notify;
10 import org.opendaylight.controller.sal.core.api.BrokerService;
11 import org.opendaylight.controller.sal.core.api.Provider;
12 import org.opendaylight.controller.sal.core.api.RpcImplementation;
13 import org.opendaylight.controller.sal.core.api.Broker.ProviderSession;
14 import org.opendaylight.yangtools.yang.common.QName;
18 * NotificationService provides access to the notification functionality of the
21 * NotificationService allows for consumption of notifications by registering
22 * implementations of NotificationListener.
24 * The registration of notification listeners could be done by:
26 * <li>returning an instance of implementation in the return value of
27 * {@link Provider#getProviderFunctionality()}
28 * <li>passing an instance of implementation and {@link QName} of rpc as an
30 * {@link ProviderSession#addRpcImplementation(QName, RpcImplementation)}
35 public interface NotificationService extends BrokerService {
38 * Registers a notification listener for supplied notification type.
43 void addNotificationListener(QName notification,
44 NotificationListener listener);
47 * Removes a notification listener for supplied notification type.
52 void removeNotificationListener(QName notification,
53 NotificationListener listener);