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.MBeanInfo;
014
015 import org.picocontainer.ComponentAdapter;
016 import org.picocontainer.PicoContainer;
017
018
019 /**
020 * Provide a MBeanInfo for a component. Several strategies exist and can be used as plugin.
021 * @author Jörg Schaible
022 */
023 public interface MBeanInfoProvider {
024
025 /**
026 * Provide a MBeanInfo for the given component. An implementation should not create an instance of the addComponent
027 * though.
028 * @param picoContainer The picoContainer to resolve dependencies or other services necessary to get the MBeanInfo.
029 * @param componentAdapter The ComponentAdapter of the component.
030 * @return Returns the MBeanInfo for the compoennt or <code>null</code> if none could be found or created.
031 */
032 MBeanInfo provide(PicoContainer picoContainer, ComponentAdapter componentAdapter);
033 }