01: /*
02: * BEGIN_HEADER - DO NOT EDIT
03: *
04: * The contents of this file are subject to the terms
05: * of the Common Development and Distribution License
06: * (the "License"). You may not use this file except
07: * in compliance with the License.
08: *
09: * You can obtain a copy of the license at
10: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
11: * See the License for the specific language governing
12: * permissions and limitations under the License.
13: *
14: * When distributing Covered Code, include this CDDL
15: * HEADER in each file and include the License file at
16: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
17: * If applicable add the following below this CDDL HEADER,
18: * with the fields enclosed by brackets "[]" replaced with
19: * your own identifying information: Portions Copyright
20: * [year] [name of copyright owner]
21: */
22:
23: /*
24: * @(#)MBeanNames.java
25: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
26: *
27: * END_HEADER - DO NOT EDIT
28: */
29: package javax.jbi.management;
30:
31: import javax.management.ObjectName;
32:
33: /**
34: * This interface provides methods to create JMX object names for component-
35: * supplied MBeans. This ensures that component-supplied MBeans follow the
36: * JBI implementation-determined naming convention.
37: * <p>
38: * Components obtain instances of this name creator using {@link
39: * javax.jbi.component.ComponentContext#getMBeanNames()}.
40: *
41: * @author JSR208 Expert Group
42: */
43: public interface MBeanNames {
44: /**
45: * Retrieve the default JMX Domain Name for MBeans registered in
46: * this instance of the JBI implementation.
47: *
48: * @return the JMX domain name for this instance of the JBI implemention;
49: * must be non-null and non-empty
50: */
51: String getJmxDomainName();
52:
53: /**
54: * Formulate and return an MBean ObjectName for a custom control
55: * of this name creator's JBI component.
56: * <p>
57: * This is used by components to create JMX names for their own JMX
58: * controls, allowing the JBI implementation to prefix the created name
59: * to fit within the implementation's own naming scheme.
60: * <p>
61: * Standard extensions must use the following custom name constants:
62: * <ul>
63: * <li>Bootstrap (installer) extension: {@link #BOOTSTRAP_EXTENSION}.</li>
64: * <li>Component life cycle extension:
65: * {@link #COMPONENT_LIFE_CYCLE_EXTENSION}.
66: * </li>
67: * </ul>
68: * All other custom component MBeans must use custom names that do not
69: * collide with the standard extension names.
70: *
71: * @param customName the name of the custom control; must be non-null and
72: * non-empty; must be legal for use in a JMX object name
73: * @return the JMX ObjectName of the MBean, or <code>null</code> if
74: * the <code>customName</code> is invalid
75: */
76: ObjectName createCustomComponentMBeanName(String customName);
77:
78: /** The custom name that must be used for bootstrap extensions */
79: static final String BOOTSTRAP_EXTENSION = "BootstrapExtension";
80:
81: /** The custom name that must be used for component life cycle extensions */
82: static final String COMPONENT_LIFE_CYCLE_EXTENSION = "LifeCycleExtension";
83: }
|