KickJava   Java API By Example, From Geeks To Geeks.

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


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 package com.sun.enterprise.management.support;
29
30 import java.util.Map JavaDoc;
31 import java.util.HashMap JavaDoc;
32 import java.util.Set JavaDoc;
33 import java.util.Collections JavaDoc;
34
35 import javax.management.ObjectName JavaDoc;
36
37 import com.sun.appserv.management.base.XTypes;
38 import static com.sun.appserv.management.base.XTypes.*;
39
40 import com.sun.appserv.management.util.misc.GSetUtil;
41
42  
43 /**
44     Maps an AMX j2eeType to/from and "old" (8.0) config type.
45     
46     See {@link com.sun.appserv.management.base.XTypes}
47  */

48 public final class OldConfigTypes extends OldTypesBase
49 {
50     private static OldConfigTypes INSTANCE = new OldConfigTypes();
51     
52         private
53     OldConfigTypes()
54     {
55         super();
56     }
57     
58         public static OldConfigTypes
59     getInstance()
60     {
61         return( INSTANCE );
62     }
63     
64
65          void
66     initMap()
67     {
68         add( DOMAIN_CONFIG, "domain");
69         add( CUSTOM_MBEAN_CONFIG, "mbean");
70         add( NODE_AGENT_CONFIG, "node-agent");
71         
72         // type, config
73
add( IIOP_SERVICE_CONFIG, "iiop-service");
74         add( HTTP_SERVICE_CONFIG, "http-service");
75         add( SECURITY_SERVICE_CONFIG, "security-service");
76         add( MONITORING_SERVICE_CONFIG, "monitoring-service");
77         add( ADMIN_SERVICE_CONFIG, "admin-service");
78         add( WEB_CONTAINER_CONFIG, "web-container");
79         add( EJB_CONTAINER_CONFIG, "ejb-container");
80         add( EJB_TIMER_SERVICE_CONFIG, "ejb-timer-service");
81         add( MDB_CONTAINER_CONFIG, "mdb-container");
82         add( AVAILABILITY_SERVICE_CONFIG, "availability-service");
83         add( JAVA_CONFIG, "java-config");
84         add( PROFILER_CONFIG, "profiler");
85         add( JMS_SERVICE_CONFIG, "jms-service");
86         add( LOG_SERVICE_CONFIG, "log-service");
87         add( TRANSACTION_SERVICE_CONFIG, "transaction-service");
88         add( MODULE_MONITORING_LEVELS_CONFIG, "module-monitoring-levels");
89         add( MODULE_LOG_LEVELS_CONFIG, "module-log-levels");
90         add( DAS_CONFIG, "das-config");
91         add( ORB_CONFIG, "orb");
92         
93         add( MANAGEMENT_RULES_CONFIG, "management-rules" );
94         add( MANAGEMENT_RULE_CONFIG, "management-rule" );
95         add( EVENT_CONFIG, "event" );
96         add( ACTION_CONFIG, "action" );
97         add( REGISTRY_LOCATION_CONFIG, "registry-location" );
98         
99         add( SECURITY_MAP_CONFIG, "security-map" );
100         add( BACKEND_PRINCIPAL_CONFIG, "backend-principal" );
101         
102         // type, name
103
add( J2EE_APPLICATION_CONFIG, "j2ee-application");
104         add( WEB_MODULE_CONFIG, "web-module");
105         add( EJB_MODULE_CONFIG, "ejb-module");
106         add( APP_CLIENT_MODULE_CONFIG, "appclient-module" );
107         add( RAR_MODULE_CONFIG, "connector-module");
108         add( LIFECYCLE_MODULE_CONFIG, "lifecycle-module");
109         add( CONFIG_CONFIG, "config");
110         add( STANDALONE_SERVER_CONFIG, "server");
111                 add( CLUSTER_CONFIG, "cluster");
112
113         // type, resources, name
114
add( JNDI_RESOURCE_CONFIG, "external-jndi-resource");
115         add( JDBC_CONNECTION_POOL_CONFIG, "jdbc-connection-pool");
116         add( JDBC_RESOURCE_CONFIG, "jdbc-resource");
117         add( CUSTOM_RESOURCE_CONFIG, "custom-resource");
118         add( ADMIN_OBJECT_RESOURCE_CONFIG, "admin-object-resource");
119         add( MAIL_RESOURCE_CONFIG, "mail-resource");
120         add( PERSISTENCE_MANAGER_FACTORY_RESOURCE_CONFIG, "persistence-manager-factory-resource");
121         add( CONNECTOR_RESOURCE_CONFIG, "connector-resource");
122         add( CONNECTOR_CONNECTION_POOL_CONFIG, "connector-connection-pool");
123         add( RESOURCE_ADAPTER_CONFIG, "resource-adapter-config");
124                 
125         // type, config, name");
126
add( AUDIT_MODULE_CONFIG, "audit-module");
127         add( AUTH_REALM_CONFIG, "auth-realm");
128         add( JACC_PROVIDER_CONFIG, "jacc-provider");
129         add( JMS_HOST_CONFIG, "jms-host");
130         add( JMS_AVAILABILITY_CONFIG, "jms-availability");
131         
132         add( DIAGNOSTIC_SERVICE_CONFIG, "diagnostic-service" );
133         add( GROUP_MANAGEMENT_SERVICE_CONFIG, "group-management-service" );
134         
135         // type, config, id
136
add( HTTP_LISTENER_CONFIG, "http-listener");
137         add( IIOP_LISTENER_CONFIG, "iiop-listener");
138         add( VIRTUAL_SERVER_CONFIG, "virtual-server");
139         
140         // type, thread-pool-id, config
141
add( THREAD_POOL_CONFIG, "thread-pool");
142         
143         add( DEPLOYED_ITEM_REF_CONFIG, "application-ref");
144         add( RESOURCE_REF_CONFIG, "resource-ref");
145                 add( SERVER_REF_CONFIG, "server-ref");
146                 add( CLUSTER_REF_CONFIG, "cluster-ref");
147                 add( HEALTH_CHECKER_CONFIG, "health-checker");
148         add( SSL_CONFIG, "ssl");
149
150         add( EJB_CONTAINER_AVAILABILITY_CONFIG, "ejb-container-availability");
151         add( WEB_CONTAINER_AVAILABILITY_CONFIG, "web-container-availability");
152
153         add( ACCESS_LOG_CONFIG, "access-log");
154         add( KEEP_ALIVE_CONFIG, "keep-alive");
155         add( CONNECTION_POOL_CONFIG, "connection-pool");
156         add( REQUEST_PROCESSING_CONFIG, "request-processing");
157         add( HTTP_PROTOCOL_CONFIG, "http-protocol");
158         add( HTTP_FILE_CACHE_CONFIG, "http-file-cache");
159
160         add( JMX_CONNECTOR_CONFIG, "jmx-connector");
161
162         add( HTTP_ACCESS_LOG_CONFIG, "http-access-log");
163
164         add( CONNECTOR_SERVICE_CONFIG, "connector-service");
165
166         add( SESSION_CONFIG, "session-config");
167         add( SESSION_MANAGER_CONFIG, "session-manager");
168         add( SESSION_PROPERTIES_CONFIG, "session-properties");
169         add( MANAGER_PROPERTIES_CONFIG, "manager-properties");
170         add( STORE_PROPERTIES_CONFIG, "store-properties");
171
172         add( MESSAGE_SECURITY_CONFIG, "message-security-config");
173         add( PROVIDER_CONFIG, "provider-config");
174         add( REQUEST_POLICY_CONFIG, "request-policy");
175         add( RESPONSE_POLICY_CONFIG, "response-policy");
176
177         add( LB_CONFIG, "lb-config");
178                 add( LOAD_BALANCER_CONFIG, "load-balancer");
179         //add( IIOP_SSL_CLIENT_CONFIG, "ssl-client-config");
180

181         add( WEB_SERVICE_ENDPOINT_CONFIG, "web-service-endpoint");
182         add( TRANSFORMATION_RULE_CONFIG, "transformation-rule");
183     }
184
185     
186     /**
187         Do not attempt to create corresponding "new" mbeans for these types
188      */

189     private static final Set JavaDoc<String JavaDoc> IGNORE_TYPES = Collections.unmodifiableSet(
190         GSetUtil.newSet( new String JavaDoc[]
191         {
192             "applications",
193             "configs",
194             "resources",
195             "clusters",
196             "servers",
197             "thread-pools",
198             "node-agents",
199             "synchronization",
200             "transactions-recovery", // not actually config
201
"ejb-timer-management", // not actually config
202
"transaction-service-manager", // not actually config
203
"lb-configs",
204             "load-balancers",
205             "properties",
206             "password-alias",
207             "olbadmin",
208             
209             // when used via config API, these are also relevant
210
"element-property",
211             "system-property",
212         } )
213     );
214     
215     
216         public static Set JavaDoc<String JavaDoc>
217     getIgnoreTypes()
218     {
219         return( IGNORE_TYPES );
220     }
221     
222     
223 }
224
225
226
227
228
229
230
231
232
Popular Tags