KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > admin > jmx > remote > server > callers > MethodCallers


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 /* CVS information
25  * $Header: /cvs/glassfish/jmx-remote/rjmx-impl/src/java/com/sun/enterprise/admin/jmx/remote/server/callers/MethodCallers.java,v 1.4 2005/12/25 04:26:39 tcfujii Exp $
26  * $Revision: 1.4 $
27  * $Date: 2005/12/25 04:26:39 $
28 */

29
30 package com.sun.enterprise.admin.jmx.remote.server.callers;
31
32 import java.util.Set JavaDoc;
33 import java.util.HashSet JavaDoc;
34 import java.util.Collections JavaDoc;
35 import javax.management.MBeanServerConnection JavaDoc;
36
37 import com.sun.enterprise.admin.jmx.remote.server.notification.ServerNotificationManager;
38
39 /** A list of method callers.
40  * @author Kedar Mhaswade
41  * @since S1AS8.0
42  * @version 1.0
43  */

44 public class MethodCallers {
45     
46     /** Creates a new instance of MethodCallerList */
47     
48     private MethodCallers() {
49     }
50     
51 /* BEGIN -- S1WS_MOD */
52 // public static Set callers(MBeanServerConnection mbsc) {
53
public static Set JavaDoc callers(MBeanServerConnection JavaDoc mbsc, ServerNotificationManager mgr) {
54 /* END -- S1WS_MOD */
55         final Set JavaDoc callers = new HashSet JavaDoc();
56 /* BEGIN -- S1WS_MOD */
57 // buildCallers(callers, mbsc);
58
buildCallers(callers, mbsc, mgr);
59 /* END -- S1WS_MOD */
60         return ( Collections.unmodifiableSet(callers) );
61     }
62     
63 /* BEGIN -- S1WS_MOD */
64 // private static void buildCallers(Set s, MBeanServerConnection mbsc) {
65
private static void buildCallers(Set JavaDoc s, MBeanServerConnection JavaDoc mbsc,
66                                      ServerNotificationManager mgr) {
67 /* END -- S1WS_MOD */
68         //can use reflection here. but for now building it statically.
69
/* BEGIN -- S1WS_MOD */
70 // s.add(new AddNotifLsnrObjNameCaller(mbsc));
71
// s.add(new AddNotifLsnrsCaller(mbsc));
72
s.add(new AddNotifLsnrObjNameCaller(mbsc, mgr));
73         s.add(new AddNotifLsnrsCaller(mbsc, mgr));
74 /* END -- S1WS_MOD */
75         s.add(new CreateMBeanCaller(mbsc));
76         s.add(new CreateMBeanLoaderCaller(mbsc));
77         s.add(new CreateMBeanLoaderParamsCaller(mbsc));
78         s.add(new CreateMBeanParamsCaller(mbsc));
79         s.add(new GetAttributeCaller(mbsc));
80         s.add(new GetAttributesCaller(mbsc));
81         s.add(new GetDefaultDomainCaller(mbsc));
82         s.add(new GetDomainsCaller(mbsc));
83         s.add(new GetMBeanCountCaller(mbsc));
84         s.add(new GetMBeanInfoCaller(mbsc));
85         s.add(new GetObjectInstanceCaller(mbsc));
86         s.add(new InvokeCaller(mbsc));
87         s.add(new IsInstanceOfCaller(mbsc));
88         s.add(new IsRegisteredCaller(mbsc));
89         s.add(new QueryMBeansCaller(mbsc));
90         s.add(new QueryNamesCaller(mbsc));
91 /* BEGIN -- S1WS_MOD */
92 // s.add(new RemoveNotifLsnrCaller(mbsc));
93
// s.add(new RemoveNotifLsnrFilterHandbackCaller(mbsc));
94
s.add(new RemoveNotifLsnrCaller(mbsc, mgr));
95         s.add(new RemoveNotifLsnrFilterHandbackCaller(mbsc, mgr));
96 /* END -- S1WS_MOD */
97         s.add(new RemoveNotifLsnrObjNameCaller(mbsc));
98 /* BEGIN -- S1WS_MOD */
99 // s.add(new RemoveNotifLsnrObjNameFilterHandbackCaller(mbsc));
100
s.add(new RemoveNotifLsnrObjNameFilterHandbackCaller(mbsc, mgr));
101 /* END -- S1WS_MOD */
102         s.add(new SetAttributeCaller(mbsc));
103         s.add(new SetAttributesCaller(mbsc));
104         s.add(new UnregisterMBeanCaller(mbsc));
105     }
106 }
107
Popular Tags