public Object getValue(ServiceValueContext valueContext) throws Exception { if (this.parameterTypeName == null) throw new IllegalStateException("Must set parameterTypeName"); String desiredType = (this.valueTypeName == null ? parameterTypeName : valueTypeName); return getValue(valueContext.getClassloader(), this.textValue, desiredType, valueContext.getAttributeInfo().getName()); }
public Object getValue(ServiceValueContext valueContext) throws Exception { if (this.parameterTypeName == null) throw new IllegalStateException("Must set parameterTypeName"); String desiredType = (this.valueTypeName == null ? parameterTypeName : valueTypeName); return getValue(valueContext.getClassloader(), this.textValue, desiredType, valueContext.getAttributeInfo().getName()); }
public Object getValue(ServiceValueContext valueContext) throws Exception ClassLoader cl = valueContext.getClassloader();
public Object getValue(ServiceValueContext valueContext) throws Exception ClassLoader cl = valueContext.getClassloader();
public Object getValue(ServiceValueContext valueContext) throws Exception ClassLoader cl = valueContext.getClassloader(); boolean trim = valueContext.isTrim(); boolean replace = valueContext.isReplace();
public Object getValue(ServiceValueContext valueContext) throws Exception ClassLoader cl = valueContext.getClassloader(); boolean trim = valueContext.isTrim(); boolean replace = valueContext.isReplace();
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 { // Get the attribute element content in a parsable form StringBuffer buffer = ServiceConfigurator.getElementContent(getElement()); Thread current = Thread.currentThread(); ClassLoader oldTcl = current.getContextClassLoader(); ClassLoader cl = valueContext.getClassloader(); if (cl != null) current.setContextClassLoader(cl); try { // Parse the attribute element content SchemaBindingResolver resolver = SingletonSchemaResolverFactory.getInstance().getSchemaBindingResolver(); Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller(); StringReader reader = new StringReader(buffer.toString()); return unmarshaller.unmarshal(reader, resolver); } finally { if (cl != null) current.setContextClassLoader(oldTcl); } } }
public Object getValue(ServiceValueContext valueContext) throws Exception { // Get the attribute element content in a parsable form StringBuffer buffer = ServiceConfigurator.getElementContent(getElement()); Thread current = Thread.currentThread(); ClassLoader oldTcl = current.getContextClassLoader(); ClassLoader cl = valueContext.getClassloader(); if (cl != null) current.setContextClassLoader(cl); try { // Parse the attribute element content SchemaBindingResolver resolver = SingletonSchemaResolverFactory.getInstance().getSchemaBindingResolver(); Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller(); StringReader reader = new StringReader(buffer.toString()); Object bean = unmarshaller.unmarshal(reader, resolver); return bean; } finally { if (cl != null) current.setContextClassLoader(oldTcl); } } }
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; }