KickJava   Java API By Example, From Geeks To Geeks.

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


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

22 public class MBeanInfoDeser extends AxisDeserializer
23 {
24    private String JavaDoc className;
25    private String JavaDoc description;
26    private MBeanAttributeInfo JavaDoc[] attributes;
27    private MBeanConstructorInfo JavaDoc[] constructors;
28    private MBeanOperationInfo JavaDoc[] operations;
29    private MBeanNotificationInfo JavaDoc[] notifications;
30
31    public void onSetChildValue(Object JavaDoc value, Object JavaDoc hint) throws SAXException JavaDoc
32    {
33       if (MBeanInfoSer.CLASS_NAME.equals(hint))
34          className = (String JavaDoc)value;
35       else if (MBeanInfoSer.DESCRIPTION.equals(hint))
36          description = (String JavaDoc)value;
37       else if (MBeanInfoSer.ATTRIBUTES.equals(hint))
38          attributes = (MBeanAttributeInfo JavaDoc[])value;
39       else if (MBeanInfoSer.CONSTRUCTORS.equals(hint))
40          constructors = (MBeanConstructorInfo JavaDoc[])value;
41       else if (MBeanInfoSer.OPERATIONS.equals(hint))
42          operations = (MBeanOperationInfo JavaDoc[])value;
43       else if (MBeanInfoSer.NOTIFICATIONS.equals(hint)) notifications = (MBeanNotificationInfo JavaDoc[])value;
44    }
45
46    protected Object JavaDoc createObject() throws SAXException JavaDoc
47    {
48       return new MBeanInfo JavaDoc(className, description, attributes, constructors, operations, notifications);
49    }
50 }
51
Popular Tags