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 James Strachan                                           *
009 *****************************************************************************/
010package org.picocontainer.gems.jmx.mx4j;
011
012import javax.management.MBeanInfo;
013
014import mx4j.AbstractDynamicMBean;
015
016
017/**
018 * DynamicMBean implementation based on MX4J.
019 * @author James Strachan
020 * @author Michael Ward
021 */
022public class MX4JDynamicMBean extends AbstractDynamicMBean {
023
024    /**
025     * Construct a MBean from an instance and a MBeanInfo.
026     * @param componentInstance the instance to expose.
027     * @param mBeanInfo the MBeanInfo for the instance.
028     */
029    public MX4JDynamicMBean(final Object componentInstance, final MBeanInfo mBeanInfo) {
030        setResource(componentInstance);
031        setMBeanInfo(mBeanInfo);
032    }
033}