public Object getValue(ServiceValueContext valueContext) throws Exception { MBeanAttributeInfo attributeInfo = valueContext.getAttributeInfo(); ClassLoader cl = valueContext.getClassloader(); MBeanServer server = valueContext.getServer(); ObjectName objectName = getObjectName(); if (proxyType != null) { if (proxyType.equals("attribute")) { proxyType = attributeInfo.getType(); if (proxyType == null) throw new ConfigurationException("AttributeInfo for " + attributeInfo.getName() + " has no type"); } Class<?> proxyClass = cl.loadClass(proxyType); return MBeanProxyExt.create(proxyClass, objectName, server, true); } return objectName; }
public Object getValue(ServiceValueContext valueContext) throws Exception { MBeanAttributeInfo attributeInfo = valueContext.getAttributeInfo(); ClassLoader cl = valueContext.getClassloader(); MBeanServer server = valueContext.getServer(); ObjectName objectName = getObjectName(); if (proxyType != null) { if (proxyType.equals("attribute")) { proxyType = attributeInfo.getType(); if (proxyType == null) throw new ConfigurationException("AttributeInfo for " + attributeInfo.getName() + " has no type"); } Class<?> proxyClass = cl.loadClass(proxyType); return MBeanProxyExt.create(proxyClass, objectName, server, true); } return objectName; }