private Object getAttribute(ObjectName objectName, String attribute, Object unavailableValue)
      throws OperationsException, MBeanException, ReflectionException {
    /* NOTE: callers methods rely on non-null value being returned */
    Object value = null;

    MBeanServer mBeanServer = agent.getMBeanServer();
    value = mBeanServer.getAttribute(objectName, attribute);

    value = (value != null) ? value : unavailableValue;

    return value;
  }
Returns attribute with given attribute name on MBean with given ObjectName.


@param objectName ObjectName for the MBean
@param attribute attribute name
@param unavailableValue return this value if the attribute value is null
@return value of attribute with given attribute name
@throws OperationsException if attribute is not found for MBean with this ObjectName or MBean
        instance is not found
@throws MBeanException if MBeans getter throws exception
@throws ReflectionException thrown when trying to invoke the setter.
geode-core/src/main/java/org/apache/geode/admin/jmx/internal/MemberInfoWithStatsMBean.java