KickJava   Java API By Example, From Geeks To Geeks.

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


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.MBeanAttributeInfo;
16 import javax.management.MBeanConstructorInfo;
17 import javax.management.MBeanException;
18 import javax.management.MBeanInfo;
19 import javax.management.MBeanNotificationInfo;
20 import javax.management.MBeanOperationInfo;
21 import javax.management.ReflectionException;
22
23 /**
24  * just a minimal dynamic mbean
25  */

26 public class DynamicAndStandard implements DynamicMBean, DynamicAndStandardMBean
27 {
28    public static final String DESCRIPTION = "dynamic mbeaninfo";
29
30    public Object getAttribute(String attribute)
31       throws AttributeNotFoundException, MBeanException, ReflectionException
32    {
33       return null;
34    }
35
36    public void setAttribute(Attribute attribute)
37       throws AttributeNotFoundException, InvalidAttributeValueException,
38       MBeanException, ReflectionException
39    {
40    }
41
42    public AttributeList getAttributes(String[] attributes)
43    {
44       return new AttributeList();
45    }
46
47    public AttributeList setAttributes(AttributeList attributes)
48    {
49       return new AttributeList();
50    }
51
52    public Object invoke(String actionName,
53                         Object[] params,
54                         String[] signature)
55       throws MBeanException, ReflectionException
56    {
57       return null;
58    }
59
60    public MBeanInfo getMBeanInfo()
61    {
62       return new MBeanInfo(this.getClass().getName(), DESCRIPTION, new MBeanAttributeInfo[0],
63                            new MBeanConstructorInfo[0], new MBeanOperationInfo[0], new MBeanNotificationInfo[0]);
64    }
65 }
66
Popular Tags