01: /*
02: * Copyright (C) The MX4J Contributors.
03: * All rights reserved.
04: *
05: * This software is distributed under the terms of the MX4J License version 1.0.
06: * See the terms of the MX4J License in the documentation provided with this software.
07: */
08:
09: package mx4j.tools.remote.soap.axis.ser;
10:
11: import javax.management.MBeanAttributeInfo;
12: import javax.management.MBeanConstructorInfo;
13: import javax.management.MBeanInfo;
14: import javax.management.MBeanNotificationInfo;
15: import javax.management.MBeanOperationInfo;
16:
17: import org.xml.sax.SAXException;
18:
19: /**
20: * @version $Revision: 1.6 $
21: */
22: public class MBeanInfoDeser extends AxisDeserializer {
23: private String className;
24: private String description;
25: private MBeanAttributeInfo[] attributes;
26: private MBeanConstructorInfo[] constructors;
27: private MBeanOperationInfo[] operations;
28: private MBeanNotificationInfo[] notifications;
29:
30: public void onSetChildValue(Object value, Object hint)
31: throws SAXException {
32: if (MBeanInfoSer.CLASS_NAME.equals(hint))
33: className = (String) value;
34: else if (MBeanInfoSer.DESCRIPTION.equals(hint))
35: description = (String) value;
36: else if (MBeanInfoSer.ATTRIBUTES.equals(hint))
37: attributes = (MBeanAttributeInfo[]) value;
38: else if (MBeanInfoSer.CONSTRUCTORS.equals(hint))
39: constructors = (MBeanConstructorInfo[]) value;
40: else if (MBeanInfoSer.OPERATIONS.equals(hint))
41: operations = (MBeanOperationInfo[]) value;
42: else if (MBeanInfoSer.NOTIFICATIONS.equals(hint))
43: notifications = (MBeanNotificationInfo[]) value;
44: }
45:
46: protected Object createObject() throws SAXException {
47: return new MBeanInfo(className, description, attributes,
48: constructors, operations, notifications);
49: }
50: }
|