KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > mx4j > tools > remote > soap > axis > ser > AttributeDeser


1 /*
2  * Copyright (C) The MX4J Contributors.
3  * All rights reserved.
4  *
5  * This software is distributed under the terms of the MX4J License version 1.0.
6  * See the terms of the MX4J License in the documentation provided with this software.
7  */

8
9 package mx4j.tools.remote.soap.axis.ser;
10
11 import javax.management.Attribute JavaDoc;
12
13 import org.xml.sax.SAXException JavaDoc;
14
15 /**
16  * @version $Revision: 1.7 $
17  */

18 public class AttributeDeser extends AxisDeserializer
19 {
20    private String JavaDoc attributeName;
21    private Object JavaDoc attributeValue;
22
23    public void onSetChildValue(Object JavaDoc value, Object JavaDoc hint) throws SAXException JavaDoc
24    {
25       if (AttributeSer.NAME.equals(hint))
26          attributeName = (String JavaDoc)value;
27       else if (AttributeSer.VALUE.equals(hint))
28          attributeValue = value;
29    }
30
31    protected Object JavaDoc createObject() throws SAXException JavaDoc
32    {
33       return new Attribute JavaDoc(attributeName, attributeValue);
34    }
35 }
36
Popular Tags