Package org.springframework.jmx.export.metadata

Examples of org.springframework.jmx.export.metadata.ManagedAttribute


   */
  @Override
  protected String getOperationDescription(Method method, String beanKey) {
    PropertyDescriptor pd = BeanUtils.findPropertyForMethod(method);
    if (pd != null) {
      ManagedAttribute ma = this.attributeSource.getManagedAttribute(method);
      if (ma != null && StringUtils.hasText(ma.getDescription())) {
        return ma.getDescription();
      }
      ManagedMetric metric = this.attributeSource.getManagedMetric(method);
      if (metric != null && StringUtils.hasText(metric.getDescription())) {
        return metric.getDescription();
      }
View Full Code Here


  protected void populateAttributeDescriptor(Descriptor desc, Method getter, Method setter, String beanKey) {
    if(getter != null && hasManagedMetric(getter)) {
      populateMetricDescriptor(desc, this.attributeSource.getManagedMetric(getter));
    }
    else {
      ManagedAttribute gma =
        (getter == null) ? ManagedAttribute.EMPTY : this.attributeSource.getManagedAttribute(getter);
      ManagedAttribute sma =
        (setter == null) ? ManagedAttribute.EMPTY : this.attributeSource.getManagedAttribute(setter);
      populateAttributeDescriptor(desc,gma,sma);
    }
  }
View Full Code Here

  @Override
  protected String getAttributeDescription(PropertyDescriptor propertyDescriptor, String beanKey) {
    Method readMethod = propertyDescriptor.getReadMethod();
    Method writeMethod = propertyDescriptor.getWriteMethod();

    ManagedAttribute getter =
        (readMethod != null) ? this.attributeSource.getManagedAttribute(readMethod) : null;
    ManagedAttribute setter =
        (writeMethod != null) ? this.attributeSource.getManagedAttribute(writeMethod) : null;

    if (getter != null && StringUtils.hasText(getter.getDescription())) {
      return getter.getDescription();
    }
    else if (setter != null && StringUtils.hasText(setter.getDescription())) {
      return setter.getDescription();
    }

    ManagedMetric metric = (readMethod != null) ? this.attributeSource.getManagedMetric(readMethod) : null;
    if(metric != null && StringUtils.hasText(metric.getDescription())) {
      return metric.getDescription();
View Full Code Here

TOP

Related Classes of org.springframework.jmx.export.metadata.ManagedAttribute

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.