KickJava   Java API By Example, From Geeks To Geeks.

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


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.MBeanOperationInfo JavaDoc;
12 import javax.management.MBeanParameterInfo JavaDoc;
13
14 import org.xml.sax.SAXException JavaDoc;
15
16 /**
17  * @version $Revision: 1.6 $
18  */

19 public class MBeanOperationInfoDeser extends AxisDeserializer
20 {
21    private String JavaDoc name;
22    private String JavaDoc description;
23    private MBeanParameterInfo JavaDoc[] signature;
24    private String JavaDoc className;
25    private int impact;
26
27    public void onSetChildValue(Object JavaDoc value, Object JavaDoc hint) throws SAXException JavaDoc
28    {
29       if (MBeanOperationInfoSer.NAME.equals(hint))
30          name = (String JavaDoc)value;
31       else if (MBeanOperationInfoSer.DESCRIPTION.equals(hint))
32          description = (String JavaDoc)value;
33       else if (MBeanOperationInfoSer.SIGNATURE.equals(hint))
34          signature = (MBeanParameterInfo JavaDoc[])value;
35       else if (MBeanOperationInfoSer.CLASS_NAME.equals(hint))
36          className = (String JavaDoc)value;
37       else if (MBeanOperationInfoSer.IMPACT.equals(hint)) impact = ((Integer JavaDoc)value).intValue();
38    }
39
40    protected Object JavaDoc createObject() throws SAXException JavaDoc
41    {
42       return new MBeanOperationInfo JavaDoc(name, description, signature, className, impact);
43    }
44 }
45
Popular Tags