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:
13: import org.xml.sax.SAXException;
14:
15: /**
16: * @version $Revision: 1.6 $
17: */
18: public class MBeanAttributeInfoDeser extends AxisDeserializer {
19: private String name;
20: private String className;
21: private String description;
22: private boolean isReadable;
23: private boolean isWritable;
24: private boolean isIs;
25:
26: public void onSetChildValue(Object value, Object hint)
27: throws SAXException {
28: if (MBeanAttributeInfoSer.NAME.equals(hint))
29: name = (String) value;
30: else if (MBeanAttributeInfoSer.CLASS_NAME.equals(hint))
31: className = (String) value;
32: else if (MBeanAttributeInfoSer.DESCRIPTION.equals(hint))
33: description = (String) value;
34: else if (MBeanAttributeInfoSer.IS_READABLE.equals(hint))
35: isReadable = ((Boolean) value).booleanValue();
36: else if (MBeanAttributeInfoSer.IS_WRITABLE.equals(hint))
37: isWritable = ((Boolean) value).booleanValue();
38: else if (MBeanAttributeInfoSer.IS_IS.equals(hint))
39: isIs = ((Boolean) value).booleanValue();
40: }
41:
42: protected Object createObject() throws SAXException {
43: return new MBeanAttributeInfo(name, className, description,
44: isReadable, isWritable, isIs);
45: }
46: }
|