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.remote.NotificationResult;
12: import javax.management.remote.TargetedNotification;
13:
14: import org.xml.sax.SAXException;
15:
16: /**
17: * @version $Revision: 1.4 $
18: */
19: public class NotificationResultDeser extends AxisDeserializer {
20: private long earliestSequenceNumber;
21: private long nextSequenceNumber;
22: private TargetedNotification[] targetedNotifications;
23:
24: public void onSetChildValue(Object value, Object hint)
25: throws SAXException {
26: if (NotificationResultSer.EARLIEST_NUMBER.equals(hint))
27: earliestSequenceNumber = ((Long) value).longValue();
28: else if (NotificationResultSer.NEXT_NUMBER.equals(hint))
29: nextSequenceNumber = ((Long) value).longValue();
30: else if (NotificationResultSer.NOTIFICATIONS.equals(hint))
31: targetedNotifications = (TargetedNotification[]) value;
32: }
33:
34: protected Object createObject() throws SAXException {
35: return new NotificationResult(earliestSequenceNumber,
36: nextSequenceNumber, targetedNotifications);
37: }
38: }
|