View Javadoc

1   /*
2    * Copyright 2004-2005 Alvaro Gonzalez de Paz (kortsoft)
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License")
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package kortsoft.kmx.jmx;
17  
18  import com.germinus.easyconf.ComponentProperties;
19  import com.germinus.easyconf.EasyConf;
20  
21  /***
22   * <a href="JmxConfig.java.html"><b><i>View Source</i></b></a>
23   *
24   * @author  Alvaro
25   * @version $Revision: 1.1 $
26   *
27   */
28  public class JmxConfig {
29      public static final String JMX_COMPONENT_NAME="kmx-jmx";
30      
31      public static final String CL_DOMAIN_PROPERTY="classLoader.domain";
32      
33      private static ComponentProperties properties;
34  
35      /***
36       * 
37       */
38      public JmxConfig() {
39          super();
40      }
41      
42      public static ComponentProperties getProperties(){
43         if (properties == null) {
44          properties = EasyConf.getConfiguration(JMX_COMPONENT_NAME).getProperties();        
45      }
46      return properties; 
47      }
48  
49      /***
50       * @return
51       */
52      public static String getClassLoaderDomainName() {        
53          return getProperties().getString(CL_DOMAIN_PROPERTY);
54      }
55      
56      
57  }