001    /*
002     * Licensed to the Apache Software Foundation (ASF) under one or more
003     * contributor license agreements.  See the NOTICE file distributed with
004     * this work for additional information regarding copyright ownership.
005     * The ASF licenses this file to You under the Apache License, Version 2.0
006     * (the "License"); you may not use this file except in compliance with
007     * the License.  You may obtain a copy of the License at
008     *
009     *      http://www.apache.org/licenses/LICENSE-2.0
010     *
011     * Unless required by applicable law or agreed to in writing, software
012     * distributed under the License is distributed on an "AS IS" BASIS,
013     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     * See the License for the specific language governing permissions and
015     * limitations under the License.
016     */
017    package javax.jbi.management;
018    
019    import javax.management.ObjectName;
020    
021    /**
022     * ComponentLifeCycleMBean defines the standard life cycle controls for
023     * JBI Installable Components.
024     * <ul>
025     *   <li>Initialize the component, preparing it to receive service requests.</li>
026     *   <li>Start the component, allowing it to initiate service requests.</li>
027     *   <li>Stop the component from initiating any more service requests.</li>
028     *   <li>Shut down the component, returning it to the uninitialized state
029     *       where it cannot receive service requests.</li>
030     *   <li>Query the JMX object name of the extension MBean for the component.</li>
031     * </ul>
032     *
033     * @author JSR208 Expert Group
034     */
035    public interface ComponentLifeCycleMBean extends LifeCycleMBean {
036    
037        /**
038         * Get the JMX ObjectName for the life cycle extension MBean for this
039         * component. If there is none, return <code>null</code>.
040         * Note that this MBean may serve as a container for multiple MBeans,
041         * as required by the component implementation.
042         *
043         * @return ObjectName the JMX object name of the additional MBean
044         *         or <code>null</code> if there is no additional MBean.
045         * @exception javax.jbi.JBIException if there is a failure getting component
046         *            information for the component to which this life cycle
047         *            applies.
048         */
049        ObjectName getExtensionMBeanName() throws javax.jbi.JBIException;
050    
051    }