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.MBeanOperationInfo;
12: import javax.management.MBeanParameterInfo;
13:
14: import org.xml.sax.SAXException;
15:
16: /**
17: * @version $Revision: 1.6 $
18: */
19: public class MBeanOperationInfoDeser extends AxisDeserializer {
20: private String name;
21: private String description;
22: private MBeanParameterInfo[] signature;
23: private String className;
24: private int impact;
25:
26: public void onSetChildValue(Object value, Object hint)
27: throws SAXException {
28: if (MBeanOperationInfoSer.NAME.equals(hint))
29: name = (String) value;
30: else if (MBeanOperationInfoSer.DESCRIPTION.equals(hint))
31: description = (String) value;
32: else if (MBeanOperationInfoSer.SIGNATURE.equals(hint))
33: signature = (MBeanParameterInfo[]) value;
34: else if (MBeanOperationInfoSer.CLASS_NAME.equals(hint))
35: className = (String) value;
36: else if (MBeanOperationInfoSer.IMPACT.equals(hint))
37: impact = ((Integer) value).intValue();
38: }
39:
40: protected Object createObject() throws SAXException {
41: return new MBeanOperationInfo(name, description, signature,
42: className, impact);
43: }
44: }
|