KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > management > support > OldMonitorTypes


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 /*
25  * Copyright 2004-2005 Sun Microsystems, Inc. All rights reserved.
26  * Use is subject to license terms.
27  */

28  
29 /*
30  */

31
32 package com.sun.enterprise.management.support;
33
34 import java.util.Map JavaDoc;
35 import java.util.HashMap JavaDoc;
36 import java.util.Iterator JavaDoc;
37
38 import javax.management.ObjectName JavaDoc;
39
40 import com.sun.appserv.management.base.XTypes;
41
42
43  
44 /**
45     Maps an AMX j2eeType to/from and "old" (8.0) monitor type.
46     
47     See {@link com.sun.appserv.management.base.XTypes}
48  */

49 public final class OldMonitorTypes extends OldTypesBase
50 {
51     private static OldMonitorTypes INSTANCE;
52     
53         private
54     OldMonitorTypes()
55     {
56         super();
57     }
58     
59         public static synchronized OldMonitorTypes
60     getInstance()
61     {
62         if ( INSTANCE == null )
63         {
64             INSTANCE = new OldMonitorTypes();
65         }
66
67         return( INSTANCE );
68     }
69     
70     /**
71         These are delegates that require a config name only, no other keys
72         other than category=monitor.
73         
74         If this list is updated, be sure to update the unit test
75         com.sun.enterprise.management.monitor.ComSunAppservMonitorTest.
76      */

77         void
78     initMap()
79     {
80         /* monitoring types */
81         add( XTypes.SERVER_ROOT_MONITOR, "root");
82         add( XTypes.SERVER_ROOT_MONITOR, "server");
83         add( XTypes.JVM_MONITOR, "jvm");
84         
85         add( XTypes.APPLICATION_MONITOR, "application");
86         add( XTypes.EJB_MODULE_MONITOR, "ejb-module");
87         add( XTypes.EJB_MODULE_MONITOR, "standalone-ejb-module");
88         
89         // in reality, only the old com.sun.appserv type 'ejb' exists as of 15 Oct 2004
90
// see bug #6179958
91
add( XTypes.STATEFUL_SESSION_BEAN_MONITOR, "stateful-bean-monitor");
92         add( XTypes.STATELESS_SESSION_BEAN_MONITOR, "stateless-bean-monitor");
93         add( XTypes.ENTITY_BEAN_MONITOR, "entity-bean-monitor");
94         add( XTypes.MESSAGE_DRIVEN_BEAN_MONITOR, "message-drive-bean-monitor");
95         
96         
97         add( XTypes.BEAN_POOL_MONITOR, "bean-pool");
98         add( XTypes.BEAN_CACHE_MONITOR, "bean-cache");
99         add( XTypes.BEAN_METHOD_MONITOR, "bean-method");
100         add( XTypes.SERVLET_MONITOR, "servlet");
101         add( XTypes.HTTP_SERVICE_MONITOR, "http-service");
102         add( XTypes.FILE_CACHE_MONITOR, "file-cache");
103
104         add( XTypes.HTTP_SERVICE_VIRTUAL_SERVER_MONITOR, "virtual-server");
105         add( XTypes.WEB_MODULE_VIRTUAL_SERVER_MONITOR, "webmodule-virtual-server");
106
107         add( XTypes.HTTP_LISTENER_MONITOR, "http-listener");
108         add( XTypes.TRANSACTION_SERVICE_MONITOR, "transaction-service");
109         add( XTypes.THREAD_POOL_MONITOR, "thread-pool");
110         add( XTypes.CONNECTION_MANAGER_MONITOR, "connection-manager");
111         add( XTypes.JDBC_CONNECTION_POOL_MONITOR, "jdbc-connection-pool");
112         add( XTypes.CONNECTOR_CONNECTION_POOL_MONITOR, "connector-connection-pool");
113         
114         add( XTypes.KEEP_ALIVE_MONITOR, "keep-alive");
115         add( XTypes.CONNECTION_QUEUE_MONITOR, "connection-queue");
116
117         add( XTypes.WEBSERVICE_ENDPOINT_MONITOR, "webservice-endpoint");
118     }
119
120 }
121
122
123
124
125
126
127
128
129
Popular Tags