1 8 9 package mx4j.tools.remote.soap.axis.ser; 10 11 import javax.management.Notification ; 12 13 import org.xml.sax.SAXException ; 14 15 18 public class NotificationDeser extends AxisDeserializer 19 { 20 private String type; 21 private Object source; 22 private long sequenceNumber; 23 private long timeStamp; 24 private String message; 25 private Object userData; 26 27 public void onSetChildValue(Object value, Object hint) throws SAXException 28 { 29 if (NotificationSer.CLASS_NAME.equals(hint)) 30 type = (String )value; 31 else if (NotificationSer.SOURCE.equals(hint)) 32 source = value; 33 else if (NotificationSer.SEQUENCE_NUMBER.equals(hint)) 34 sequenceNumber = ((Long )value).longValue(); 35 else if (NotificationSer.TIMESTAMP.equals(hint)) 36 timeStamp = ((Long )value).longValue(); 37 else if (NotificationSer.MESSAGE.equals(hint)) 38 message = (String )value; 39 else if (NotificationSer.USER_DATA.equals(hint)) userData = value; 40 } 41 42 protected Object createObject() throws SAXException 43 { 44 Notification notification = new Notification (getType(), getSource(), getSequenceNumber(), getTimeStamp(), getMessage()); 45 notification.setUserData(getUserData()); 46 return notification; 47 } 48 49 protected String getType() 50 { 51 return type; 52 } 53 54 protected Object getSource() 55 { 56 return source; 57 } 58 59 protected long getSequenceNumber() 60 { 61 return sequenceNumber; 62 } 63 64 protected long getTimeStamp() 65 { 66 return timeStamp; 67 } 68 69 protected String getMessage() 70 { 71 return message; 72 } 73 74 protected Object getUserData() 75 { 76 return userData; 77 } 78 } 79 | Popular Tags |