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.concepts.Registration;
15 import org.opendaylight.yangtools.yang.common.QName;
19 * NotificationService provides access to the notification functionality of the
22 * NotificationService allows for consumption of notifications by registering
23 * implementations of NotificationListener.
25 * The registration of notification listeners could be done by:
27 * <li>returning an instance of implementation in the return value of
28 * {@link Provider#getProviderFunctionality()}
29 * <li>passing an instance of implementation and {@link QName} of rpc as an
31 * {@link ProviderSession#addRpcImplementation(QName, RpcImplementation)}
36 public interface NotificationService extends BrokerService {
39 * Registers a notification listener for supplied notification type.
44 Registration<NotificationListener> addNotificationListener(QName notification,
45 NotificationListener listener);