Gaurav Agrawal | b102b01 | 2016-08-02 12:52:48 +0530 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Foundation |
Gaurav Agrawal | b102b01 | 2016-08-02 12:52:48 +0530 | [diff] [blame] | 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.ydt; |
| 18 | |
| 19 | /** |
| 20 | * Abstraction of an entity which provide call back methods which are called |
| 21 | * by YDT walker while walking the YANG data tree. |
VinodKumarS-Huawei | 7b1733c | 2016-10-25 13:44:26 +0530 | [diff] [blame] | 22 | * <p> |
Gaurav Agrawal | b102b01 | 2016-08-02 12:52:48 +0530 | [diff] [blame] | 23 | * In a response to execute operation YMS returns the YMS operation results |
| 24 | * with root YDT node. Now, protocols needs to walk through the YDT node and |
| 25 | * constructs the corresponding data format string. Protocol can opt to use |
| 26 | * listener or visitor based walking mechanism. |
VinodKumarS-Huawei | 7b1733c | 2016-10-25 13:44:26 +0530 | [diff] [blame] | 27 | * <p> |
Gaurav Agrawal | b102b01 | 2016-08-02 12:52:48 +0530 | [diff] [blame] | 28 | * This interface needs to be implemented by protocol implementing listener's |
| 29 | * based call backs while YDT walk. |
| 30 | */ |
| 31 | public interface YdtListener { |
| 32 | |
| 33 | /** |
| 34 | * YANG data tree node's entry, it will be called during a node entry. |
| 35 | * All the related information about the node can be obtain from the YDT |
| 36 | * context. |
| 37 | * |
| 38 | * @param ydtContext YANG data tree context |
| 39 | */ |
| 40 | void enterYdtNode(YdtContext ydtContext); |
| 41 | |
| 42 | /** |
| 43 | * YANG data tree node's exit, it will be called during a node exit. |
| 44 | * All the related information about the node can be obtain from the YDT |
| 45 | * context. |
| 46 | * |
| 47 | * @param ydtContext YANG data tree context |
| 48 | */ |
| 49 | void exitYdtNode(YdtContext ydtContext); |
| 50 | } |