1 7 8 10 package org.jboss.net.jmx.adaptor; 11 12 import org.jboss.axis.Constants; 13 import org.jboss.axis.encoding.SerializationContext; 14 import org.jboss.axis.encoding.Serializer; 15 import org.jboss.axis.wsdl.fromJava.Types; 16 import org.w3c.dom.Element ; 17 import org.xml.sax.Attributes ; 18 19 import javax.management.MBeanParameterInfo ; 20 import javax.xml.namespace.QName ; 21 import java.io.IOException ; 22 23 24 32 public class MBeanParameterInfoSer 33 implements Serializer 34 { 35 36 public void serialize(QName name, 37 Attributes attributes, 38 Object value, 39 SerializationContext context) 40 throws IOException 41 { 42 if (!(value instanceof MBeanParameterInfo )) 43 throw new IOException ("Can't serialize a " + value.getClass().getName() + " instance with a MBeanParameterInfo Serializer."); 44 context.startElement(name, attributes); 45 46 context.serialize(new QName ("", "name"), null, ((MBeanParameterInfo )value).getName()); 47 context.serialize(new QName ("", "type"), null, ((MBeanParameterInfo )value).getType()); 48 context.serialize(new QName ("", "description"), null, ((MBeanParameterInfo )value).getDescription()); 49 50 context.endElement(); 51 return; 52 53 54 } 55 56 public Element writeSchema(Class aClass, Types types) throws Exception 57 { 58 return null; 59 } 60 61 public String getMechanismType() 62 { 63 return Constants.AXIS_SAX; 64 } 65 66 } | Popular Tags |