1 7 8 10 package org.jboss.net.jmx.adaptor; 11 12 import org.jboss.axis.encoding.DeserializationContext; 13 import org.jboss.axis.encoding.Deserializer; 14 import org.jboss.axis.encoding.DeserializerImpl; 15 import org.jboss.axis.encoding.DeserializerTarget; 16 import org.jboss.axis.message.SOAPHandler; 17 import org.xml.sax.Attributes ; 18 import org.xml.sax.SAXException ; 19 20 import javax.management.MBeanConstructorInfo ; 21 import javax.management.MBeanParameterInfo ; 22 import javax.xml.namespace.QName ; 23 24 32 public class MBeanConstructorInfoDeser extends DeserializerImpl 33 { 34 35 private String name; 36 private String description; 37 private MBeanParameterInfo [] signature; 38 39 public void onStartElement(String namespace, 40 String localName, 41 String prefix, 42 Attributes attributes, 43 DeserializationContext context) 44 throws SAXException 45 { 46 47 if (context.isNil(attributes)) 48 { 49 return; 50 } 51 52 54 } 55 56 public SOAPHandler onStartChild(String namespace, 57 String localName, 58 String prefix, 59 Attributes attributes, 60 DeserializationContext context) 61 throws SAXException 62 { 63 64 QName itemType = 66 context.getTypeFromAttributes(namespace, localName, attributes); 67 Deserializer dSer = null; 69 if (itemType != null) 70 { 71 dSer = context.getDeserializerForType(itemType); 72 } 73 if (dSer == null) 74 { 75 dSer = new DeserializerImpl(); 76 } 77 78 dSer.registerValueTarget(new DeserializerTarget(this, localName)); 81 82 addChildDeserializer(dSer); 83 84 return (SOAPHandler)dSer; 85 } 86 87 public void setChildValue(Object value, Object hint) throws SAXException 88 { 89 if (hint.equals("name")) 90 name = (String )value; 91 else if (hint.equals("description")) 92 description = (String )value; 93 else if (hint.equals("signature")) 94 signature = (MBeanParameterInfo [])value; 95 96 } 97 98 public void onEndElement(String s, 99 String s1, 100 DeserializationContext deserializationcontext) 101 { 102 try 103 { 104 super.value = new MBeanConstructorInfo (name, description, signature); 105 } 106 catch (Exception exception) 107 { 108 exception.printStackTrace(); 109 } 110 } 111 112 } 113 | Popular Tags |