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.DynamicMBean;
12: import javax.management.ObjectName;
13:
14: /**
15: * Helper class to associate a MBean with an ObjectName.
16: * @author Jörg Schaible
17: */
18: public class JMXRegistrationInfo {
19:
20: private final ObjectName objectName;
21: private final DynamicMBean mBean;
22:
23: /**
24: * Construct a JMXRegistrationInfo.
25: * @param objectName The {@link ObjectName} used for the registration in the {@link javax.management.MBeanServer}.
26: * @param mBean The {@link DynamicMBean} to register.
27: */
28: public JMXRegistrationInfo(final ObjectName objectName,
29: final DynamicMBean mBean) {
30: this .objectName = objectName;
31: this .mBean = mBean;
32: }
33:
34: /**
35: * @return Returns the MBean.
36: */
37: public DynamicMBean getMBean() {
38: return mBean;
39: }
40:
41: /**
42: * @return Returns the proposed {@link ObjectName}.
43: */
44: public ObjectName getObjectName() {
45: return objectName;
46: }
47: }
|