KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > compliance > server > support > TestMBeanServerDelegate


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.server.support;
9
10 import javax.management.MBeanServerDelegate;
11 import javax.management.Notification;
12
13 /**
14  * An alternate MBeanServerDelegate
15  *
16  * @author <a HREF="mailto:Adrian.Brock@HappeningTimes.com">Adrian Brock</a>.
17  * @version $Revision: 1.3 $
18  */

19 public class TestMBeanServerDelegate
20    extends MBeanServerDelegate
21 {
22    public boolean invoked = false;
23
24    public String getMBeanServerId()
25    {
26       invoked = true;
27       return super.getMBeanServerId();
28    }
29
30    public void sendNotification(Notification notification)
31    {
32       notification.setUserData("replaced");
33       super.sendNotification(notification);
34    }
35 }
36
Popular Tags