Bharat saraswal | f53b29a | 2016-09-27 15:35:15 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015-present Open Networking Laboratory |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package org.onosproject.yms.app.ynh; |
| 18 | |
| 19 | import org.onosproject.event.ListenerService; |
| 20 | import org.onosproject.yms.ynh.YangNotificationService; |
| 21 | |
| 22 | /** |
| 23 | * Abstraction of an entity which provides interfaces to YANG extended notification |
| 24 | * service. It provides extended interfaces required by YMS internal modules. |
| 25 | * Application registers their schema with YMSM, YMSM delegates the registration |
| 26 | * request to YSR. YSR then looks for the presence of notification in application |
| 27 | * schema, presence of notification will trigger YSR to ask YANG extended notification |
| 28 | * service to register it as a listener to that application events. |
| 29 | */ |
| 30 | public interface YangNotificationExtendedService extends YangNotificationService { |
| 31 | |
| 32 | /** |
| 33 | * Registers as listener with application. This is called by YSR when it |
| 34 | * detects notification presence in application YANG file at the time when |
| 35 | * application registers it's schema with YMS. |
| 36 | * |
| 37 | * @param appObject application object |
| 38 | */ |
| 39 | void registerAsListener(ListenerService appObject); |
| 40 | |
| 41 | // TODO handle scenario when multiple services are implemented by single manager. |
| 42 | } |