blob: db64deaf4cf1e7ab30d15a01fe93f3f961a7d1ae [file] [log] [blame]
Shankara-Huaweid5823ab2016-11-22 10:14:52 +05301/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2016-present Open Networking Foundation
Shankara-Huaweid5823ab2016-11-22 10:14:52 +05303 *
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
17package org.onosproject.yms.app.ych.defaultcodecs.xml;
18
19import org.dom4j.Element;
20
21/**
22 * Abstraction of an entity which provide call back methods which are called
23 * by xml walker while walking the xml data tree. This interface needs to be
24 * implemented by protocol implementing listener's based call backs while
25 * xml walk.
26 */
27interface XmlListener {
28
29 /**
30 * Callback invoked during a node entry. All the related information
31 * about the node can be obtained from the element.
32 *
33 * @param element current xml node(element)
34 * @param nodeType xml node type
35 * @param rootElement root element
36 */
37 void enterXmlElement(Element element, XmlNodeType nodeType,
38 Element rootElement);
39
40 /**
41 * Callback invoked during a node exit. All the related information
42 * about the node can be obtained from the element.
43 *
44 * @param element current xml node(element)
45 * @param nodeType xml node type
46 * @param rootElement root element
47 */
48 void exitXmlElement(Element element, XmlNodeType nodeType,
49 Element rootElement);
50}