KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > appserv > management > config > CustomMBeanConfig


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 package com.sun.appserv.management.config;
24
25 import com.sun.appserv.management.base.XTypes;
26
27
28 /**
29     Configuration for custom MBean.
30     <p>
31     When a Custom MBean is loaded, the object name specified via
32     the 'ObjectNameInConfig' Attribute is used. The JMX Domain
33     will always be {@link #JMX_DOMAIN}.
34     <p>
35     If there is a name specified in 'ObjectNameInConfig' eg
36     "name=name1", that name is used and the name as returned
37     by {@link #getName} is not used within the ObjectName.
38     
39     <b>Questions</b>
40     <ul>
41     <li>
42         When setEnabled( true/false ) is called, are custom MBeans dynamically
43         loaded and unloaded? Document this here.
44     </li>
45     <li>
46         How to obtain the ObjectName for the runtime MBean that
47         this config specifies?
48     </li>
49     <li>
50         Are runtime MBeans loaded only in the DAS, or in each server?
51         What about the Node Agent? If they are loaded per server,
52         what is put into the ObjectName to distinguish them?
53     </li>
54     <li>
55         All these either/or cases are confusing. We should restrict
56         the object-name Attribute to properties, prohibit a 'name'
57         property, and require a 'type' property--my opinion--Lloyd
58     </li>
59     </ul>
60     
61     @see com.sun.appserv.management.config.DomainConfig#getCustomMBeanConfigMap
62  */

63 public interface CustomMBeanConfig
64     extends NamedConfigElement, Enabled, PropertiesAccess, ObjectType,
65     DeployedItemRefConfigReferent, Description
66 {
67 /** The j2eeType as returned by {@link com.sun.appserv.management.base.AMX#getJ2EEType}. */
68     public static final String JavaDoc J2EE_TYPE = XTypes.CUSTOM_MBEAN_CONFIG;
69     
70     /**
71         The JMX domain in which all custom MBeans are registered by default.
72      */

73     public static final String JavaDoc JMX_DOMAIN = "user";
74     
75     /**
76         Get the ObjectName as configured (which could differ from the ObjectName
77         with which the MBean is registered--TBD).
78         This Attribute may not be changed; it is read-only.
79      */

80     public String JavaDoc getObjectNameInConfig();
81     
82     /**
83         Get the implementation class.
84         This Attribute is read-only.
85      */

86     public String JavaDoc getImplClassname();
87 }
88
89
90
91
92
93
94
95
96
97
98
99
Popular Tags