1 8 9 package mx4j.tools.remote.soap.axis.ser; 10 11 import javax.management.relation.RoleInfo ; 12 13 import org.xml.sax.SAXException ; 14 15 18 public class RoleInfoDeser extends AxisDeserializer 19 { 20 private String name; 21 private String description; 22 private String refMBeanClassName; 23 private boolean readable; 24 private boolean writeable; 25 private int minDegree; 26 private int maxDegree; 27 28 public void onSetChildValue(Object value, Object hint) throws SAXException  29 { 30 if (RoleInfoSer.NAME.equals(hint)) name = (String )value; 31 if (RoleInfoSer.DESCRIPTION.equals(hint)) description = (String )value; 32 if (RoleInfoSer.REF_MBEAN_CLASS_NAME.equals(hint)) refMBeanClassName = (String )value; 33 if (RoleInfoSer.READABLE.equals(hint)) readable = ((Boolean )value).booleanValue(); 34 if (RoleInfoSer.WRITEABLE.equals(hint)) writeable = ((Boolean )value).booleanValue(); 35 if (RoleInfoSer.MIN_DEGREE.equals(hint)) minDegree = ((Integer )value).intValue(); 36 if (RoleInfoSer.MAX_DEGREE.equals(hint)) maxDegree = ((Integer )value).intValue(); 37 } 38 39 protected Object createObject() throws SAXException  40 { 41 try 42 { 43 RoleInfo roleInfo = 44 new RoleInfo (name, refMBeanClassName, readable, writeable, minDegree, maxDegree, description); 45 return roleInfo; 46 } 47 catch (Exception e) 48 { 49 throw new SAXException (e); 50 } 51 } 52 53 } 54 | Popular Tags |