KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > mx4j > tools > remote > soap > axis > ser > MBeanServerNotificationFilterDeser


1 /*
2  * Copyright (C) The MX4J Contributors.
3  * All rights reserved.
4  *
5  * This software is distributed under the terms of the MX4J License version 1.0.
6  * See the terms of the MX4J License in the documentation provided with this software.
7  */

8
9 package mx4j.tools.remote.soap.axis.ser;
10
11 import javax.management.ObjectName JavaDoc;
12 import javax.management.relation.MBeanServerNotificationFilter JavaDoc;
13
14 import org.xml.sax.SAXException JavaDoc;
15
16 /**
17  * @version $Revision: 1.3 $
18  */

19 public class MBeanServerNotificationFilterDeser extends AxisDeserializer
20 {
21    private MBeanServerNotificationFilter JavaDoc filter = new MBeanServerNotificationFilter JavaDoc();
22
23    protected void onSetChildValue(Object JavaDoc value, Object JavaDoc hint) throws SAXException JavaDoc
24    {
25       if (NotificationFilterSupportSer.NOTIFICATION_TYPE.equals(hint))
26          filter.enableType((String JavaDoc)value);
27       else if (MBeanServerNotificationFilterSer.ALL_DISABLED.equals(hint) && ((Boolean JavaDoc)value).booleanValue())
28          filter.disableAllObjectNames();
29       else if (MBeanServerNotificationFilterSer.ALL_ENABLED.equals(hint) && ((Boolean JavaDoc)value).booleanValue())
30          filter.enableAllObjectNames();
31       else if (MBeanServerNotificationFilterSer.ENABLED_OBJECT_NAME.equals(hint))
32          filter.enableObjectName((ObjectName JavaDoc)value);
33       else if (MBeanServerNotificationFilterSer.DISABLED_OBJECT_NAME.equals(hint)) filter.disableObjectName((ObjectName JavaDoc)value);
34    }
35
36    protected Object JavaDoc createObject() throws SAXException JavaDoc
37    {
38       return filter;
39    }
40 }
41
Popular Tags