01: /*****************************************************************************
02: * Copyright (C) NanoContainer Organization. All rights reserved. *
03: * ------------------------------------------------------------------------- *
04: * The software in this package is published under the terms of the BSD *
05: * style license a copy of which has been included with this distribution in *
06: * the LICENSE.txt file. *
07: * *
08: * Original code by Joerg Schaible *
09: *****************************************************************************/package org.picocontainer.gems.jmx;
10:
11: import javax.management.MBeanInfo;
12: import javax.management.NotCompliantMBeanException;
13: import javax.management.StandardMBean;
14:
15: /**
16: * StandardMBean with a provided MBeanInfo.
17: * @author Jörg Schaible
18: */
19: public final class StandardNanoMBean extends StandardMBean {
20: private final MBeanInfo mBeanInfo;
21:
22: /**
23: * Construct a StandardNanoMBean. The only difference to a {@link StandardMBean} of the JSR 3 is the user provided
24: * {@link MBeanInfo}.
25: * @param implementation
26: * @param management
27: * @param mBeanInfo
28: * @throws NotCompliantMBeanException
29: */
30: public StandardNanoMBean(final Object implementation,
31: final Class management, final MBeanInfo mBeanInfo)
32: throws NotCompliantMBeanException {
33: super (implementation, management);
34: this .mBeanInfo = mBeanInfo;
35: }
36:
37: /**
38: * Return the provided {@link MBeanInfo}.
39: * @see javax.management.StandardMBean#getMBeanInfo()
40: */
41: public MBeanInfo getMBeanInfo() {
42: return mBeanInfo;
43: }
44: }
|