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.ObjectName;
12: import javax.management.relation.MBeanServerNotificationFilter;
13:
14: import org.xml.sax.SAXException;
15:
16: /**
17: * @version $Revision: 1.3 $
18: */
19: public class MBeanServerNotificationFilterDeser extends
20: AxisDeserializer {
21: private MBeanServerNotificationFilter filter = new MBeanServerNotificationFilter();
22:
23: protected void onSetChildValue(Object value, Object hint)
24: throws SAXException {
25: if (NotificationFilterSupportSer.NOTIFICATION_TYPE.equals(hint))
26: filter.enableType((String) value);
27: else if (MBeanServerNotificationFilterSer.ALL_DISABLED
28: .equals(hint)
29: && ((Boolean) value).booleanValue())
30: filter.disableAllObjectNames();
31: else if (MBeanServerNotificationFilterSer.ALL_ENABLED
32: .equals(hint)
33: && ((Boolean) value).booleanValue())
34: filter.enableAllObjectNames();
35: else if (MBeanServerNotificationFilterSer.ENABLED_OBJECT_NAME
36: .equals(hint))
37: filter.enableObjectName((ObjectName) value);
38: else if (MBeanServerNotificationFilterSer.DISABLED_OBJECT_NAME
39: .equals(hint))
40: filter.disableObjectName((ObjectName) value);
41: }
42:
43: protected Object createObject() throws SAXException {
44: return filter;
45: }
46: }
|