001    /*****************************************************************************
002     * Copyright (C) NanoContainer Organization. All rights reserved.            *
003     * ------------------------------------------------------------------------- *
004     * The software in this package is published under the terms of the BSD      *
005     * style license a copy of which has been included with this distribution in *
006     * the LICENSE.txt file.                                                     *
007     *                                                                           *
008     * Original code by Joerg Schaible                                               *
009     *****************************************************************************/
010    
011    package org.picocontainer.gems.jmx;
012    
013    import javax.management.DynamicMBean;
014    
015    import org.picocontainer.ComponentAdapter;
016    import org.picocontainer.PicoContainer;
017    
018    
019    /**
020     * Provide instances of DynamicMBean from Pico components.
021     * @author Jörg Schaible
022     */
023    public interface DynamicMBeanProvider {
024    
025        /**
026         * Provide a {@link DynamicMBean} from the component delivered by the ComponentAdapter.
027         * @param picoContainer The {@link PicoContainer} to resolve dependencies.
028         * @param componentAdapter The {@link ComponentAdapter} referring the component.
029         * @return Returns the registration information.
030         */
031        public JMXRegistrationInfo provide(PicoContainer picoContainer, ComponentAdapter componentAdapter);
032    }