01: /* JFox, the OpenSource J2EE Application Server
02: *
03: * Copyright (C) 2002 huihoo.com
04: * Distributable under GNU LGPL license
05: * See the GNU Lesser General Public License for more details.
06: */
07:
08: package org.huihoo.jfox.jmx;
09:
10: import javax.management.ObjectInstance;
11: import javax.management.MalformedObjectNameException;
12: import javax.management.ObjectName;
13:
14: /**
15: *
16: * @author <a href="mailto:young_yy@hotmail.com">Young Yang</a>
17: */
18:
19: public class ExtendedObjectInstance extends ObjectInstance {
20: private Class mbeanClass;
21: private Class interfaceClass;
22:
23: /*
24: public ExtendedObjectInstance(String objectName, String className, String interfaceClassName) throws MalformedObjectNameException {
25: super(objectName, className);
26: this.interfaceClassName = interfaceClassName;
27: }
28:
29: public ExtendedObjectInstance(ObjectName objectName, String className, String interfaceClassName) {
30: super(objectName, className);
31: this.interfaceClassName = interfaceClassName;
32: }
33: */
34:
35: public ExtendedObjectInstance(String objectName, Class mbeanClass,
36: Class interfaceClass) throws MalformedObjectNameException {
37: super (objectName, mbeanClass.getName());
38: this .mbeanClass = mbeanClass;
39: this .interfaceClass = interfaceClass;
40: }
41:
42: public ExtendedObjectInstance(ObjectName objectName,
43: Class mbeanClass, Class interfaceClass) {
44: super (objectName, mbeanClass.getName());
45: this .mbeanClass = mbeanClass;
46: this .interfaceClass = interfaceClass;
47: }
48:
49: public String getInterfaceClassName() {
50: return interfaceClass.getName();
51: }
52:
53: public Class getMbeanClass() {
54: return mbeanClass;
55: }
56:
57: public Class getInterfaceClass() {
58: return interfaceClass;
59: }
60:
61: }
|