KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > compliance > notcompliant > support > NullDynamic


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7
8 package test.compliance.notcompliant.support;
9
10 import javax.management.Attribute;
11 import javax.management.AttributeList;
12 import javax.management.AttributeNotFoundException;
13 import javax.management.DynamicMBean;
14 import javax.management.InvalidAttributeValueException;
15 import javax.management.MBeanException;
16 import javax.management.MBeanInfo;
17 import javax.management.ReflectionException;
18
19 /**
20  * A dynamic mbean with Null MBeanInfo
21  */

22 public class NullDynamic implements DynamicMBean
23 {
24    public Object getAttribute(String attribute)
25       throws AttributeNotFoundException, MBeanException, ReflectionException
26    {
27       return null;
28    }
29
30    public void setAttribute(Attribute attribute)
31       throws AttributeNotFoundException, InvalidAttributeValueException,
32       MBeanException, ReflectionException
33    {
34    }
35
36    public AttributeList getAttributes(String[] attributes)
37    {
38       return new AttributeList();
39    }
40
41    public AttributeList setAttributes(AttributeList attributes)
42    {
43       return new AttributeList();
44    }
45
46    public Object invoke(String actionName,
47                         Object[] params,
48                         String[] signature)
49       throws MBeanException, ReflectionException
50    {
51       return null;
52    }
53
54    public MBeanInfo getMBeanInfo()
55    {
56       return null;
57    }
58 }
59
Popular Tags